Operating System - OpenVMS
1825803 Members
2765 Online
109687 Solutions
New Discussion

Re: VMS Filenames and extensions

 
SOLVED
Go to solution
Angel_40
New Member

VMS Filenames and extensions

Is it possible to create a file in VMS, which does not contain an file extension nor the "."
character?

e.g. $ rename afile.txt afile

If so, please provide required syntax,

Thanks,

Angel
15 REPLIES 15
Travis Craig
Frequent Advisor

Re: VMS Filenames and extensions

I'm not sure what you can do with ods-5, but the "." is an implicit part of the file specification in the regular VMS file system. You can have a blank extension and an blank name, but you'll always have the dot.

--Travis Craig
My head is cold.
Ian Miller.
Honored Contributor

Re: VMS Filenames and extensions

$ rename afile.txt afile.
would get you a file called afile. which is
as close as you get on ODS2.
____________________
Purely Personal Opinion
comarow
Trusted Contributor

Re: VMS Filenames and extensions

It will always have the period.

You can call it anything, but it will have a period.

for example. rename Sam.txt sam
you'll have sam.

There's no getting rid of the period.

Bob
Jan van den Ende
Honored Contributor

Re: VMS Filenames and extensions

Angel,

the syntax of a file in VMS describes it (ignoring dir spec for this purpose) as dot semicolon
Where , , and are under your control (within their acceptable domains).
However, the dot ( . ) and semicolon ( ; ) are just part of the formal syntax.
No way to get around that.
Various commands have various ways of completing any parts of the file syntax on a command line, but you WILL always deal with a complete syntax, which the OS will always use in any action, response, or display.

It _IS_ possible for name and/or version to be null-strings, but the version will ALWAYS be an integer between 1 and 32767

But,
WHAT is the background of your question? WHAT are you trying to achieve?

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: VMS Filenames and extensions

Angel,
welcome to vms forum :-)
you received full answers to your question. Just for curiosity, why you need blinding dot char?

Antonio Vigliotti
Antonio Maria Vigliotti
John Gillings
Honored Contributor
Solution

Re: VMS Filenames and extensions

You guys just aren't thinking in OpenVMS! Of COURSE you can have a file name without .'s or semicolons:

$ DEFINE afile afile.txt

now you have the name "afile" which will refer to your file. It's not persistent, and might not scale very well, but that wasn't specified in the problem description :-)
A crucible of informative mistakes
Eberhard Wacker
Valued Contributor

Re: VMS Filenames and extensions

Exactly as John said: using a logical is the usual way to access files without the need to enter any valid expression of an RMS file including brackets and dots and does have the advantage of shortening.
$ t f !sure that's overdone
can bé equivalent to
$ type/page=save=5 dev:[dir1.dir2.dir3.dir4]filnam.ext;v

And there are some DCL commands which handle a special extension as default.
So e.g. TYPE AFILE acts as TYPE AFILE.LIS and @AFILE acts as @AFILE.COM

Cheer
Mobeen_1
Esteemed Contributor

Re: VMS Filenames and extensions

John,
My compliments, you have out-thought many of us :)
I am cursing myself for not having thought on the same lines as you.
At least on a daily basis i used the "define" command 10-15 times :)

regards
Mobeen
Angel_40
New Member

Re: VMS Filenames and extensions

First, I want to thank each expert who has replied.

So the original goal (using OSD-5) is to transfer the file to a NFS mounted device
shared by UNIX which does not include the
dot using rename command to eliminate it. (the dot)

I'm not sure if the logical assignment will work, but I give it a shot.

Any other great ideas/methods for ODS-5 mounted volumes?
Doug Phillips
Trusted Contributor

Re: VMS Filenames and extensions

Angel,

>>
So the original goal (using OSD-5) is to transfer the file to a NFS mounted device
shared by UNIX ...
<<

Have you tried this yet? Are you sure it's a problem? The VMS side will always show a .;n but I think the NFS server understands that *nix doesn't want those characters. Don't have a *nix NFS mount handy to test with, but my recall is that this is the case.

Just like when you create a file named afile from the *nix side, if you $dir it from VMS you'll see afile.;1

-Doug
Jan van den Ende
Honored Contributor

Re: VMS Filenames and extensions

Angel,

Doug did a pretty nice explanation.

While I can not give a definite answer concerning Linux (by lack of experience), I _CAN_ give our Tru64 experience.

It seemed quite fancy at first, but turned out to work rather consistent.

We were even able to have full version support when viewed from VMS, and from Tru64, the files were reported with "ls".
But functionally, only the highest version was addressable, without the semicolon!
(those were mainly .HTML files, and Tru64 Apache just accepted the highest version. In fact, better than VMS Apache 2.0 did later on).
VMS behaved like VMS, and Tru64 like Tru64.
I would suspect (and hope for your sake) that Linux behaves similar.

Proost.

Have one on me.

jpe


Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: VMS Filenames and extensions

Angel,
I daily transfer from vms to windows and viceversa. When I want a file without dot I don't use extension; on vms side I see "file." while on windows side I see "file". I guess it's the same for unix transfer.
Logical name can't help you because it's a feature of running shell in vms environment and it's no part of filename.

Have a nice day!

Antonio Vigliotti
Antonio Maria Vigliotti
Bojan Nemec
Honored Contributor

Re: VMS Filenames and extensions

Angel,


I try a little test with VMS 7.3-2 TCPIP V5.4 - ECO 2 and RedHat Linux 8.0.

$ CREATE DNFS100:[000000]a

$ DIR DNFS100:[000000]a
Directory DNFS100:[000000]

A.;1

Total of 1 file.

On Linux (/home/bojan/nfsexp/ is the exported directory):
ls /home/bojan/nfsexp/a*
a

So there is no . (dot) or ; (semicolon) in the linux file name.

Bojan
Bojan Nemec
Honored Contributor

Re: VMS Filenames and extensions

Sorry,

I just see another thing in yours original post:

$ rename afile.txt afile

will produce afile.txt! (no changes to the file type) the right command is:

$ rename afile.txt afile.
or
$ rename afile.txt afile.;

which will produce afile.;n (where n is the version). This file is seen from the unix system as afile without dots and semicolons.

Bojan

Daniel Fernandez Illan
Trusted Contributor

Re: VMS Filenames and extensions

Angel
I had checked same test as Borjan using VMS 7.3.2 and HP-UX 11v2 and I had the same reponse
dot dissapears on HP-UX but when I intend repeat CREATE command from VMS, appears on VMS 2 files - a.;2 and a.;1 - but from UNIX there are 3 files - a, a;2 and a;1 -

Saludos.
Daniel.