Operating System - OpenVMS
1819915 Members
2282 Online
109607 Solutions
New Discussion юеВ

Re: dir/full latest version

 
quinnd6
Occasional Advisor

dir/full latest version

I was using "dir/full" to view the properties of a file but the problem is vms keeps copies of the file so when I enter in
"dir/full filename.extension"

then the details of the file for every version of that file since 2006 are displayed.

How do I get this to work for the latest version only?
6 REPLIES 6
Ian Miller.
Honored Contributor

Re: dir/full latest version

$ DIR/FULL filename.extension;0

;0 means highest version.

____________________
Purely Personal Opinion
quinnd6
Occasional Advisor

Re: dir/full latest version

great thanks
Wim Van den Wyngaert
Honored Contributor

Re: dir/full latest version

and the 0 is optional.

Wim
Wim
Hein van den Heuvel
Honored Contributor

Re: dir/full latest version

For sake of completeness, you can also use:

$DIR/VERSIONS=1 file.ext

Personally I just always use: $DIR file.ext.

The . types slightly more easy for me,
and every now and then someone is surprised to see the . as alternative to ; in this case.

Cheers,
Hein.


Jess Goodman
Esteemed Contributor

Re: dir/full latest version

There is a potential gotcha with using /VESRION=1 instead of ;0 or ;.

While they will produce the same result with a simple "directory filename" command as discussed here, consider the commands:

$ DIR *.LOG; /BEFORE=TODAY
which will display nothing if the latest version of all log files were created today, as opposed to...

$ DIR *.LOG /BEFORE=TODAY /VERSION=1
which will display one old version (the last one created before today) of each log file.

Also there is a performance difference since with ;0 only the latest version of the file is looked up by RMS but with /VERSION=1 and without ;0 RMS looks up all versions and the DIRECTORY program ignores other versions. You can see this by first doing:
$ SET WATCH FILE/CLASS=(MAJOR,DIR)
I have one, but it's personal.
Thomas Ritter
Respected Contributor

Re: dir/full latest version

If typing is a problem try

$ dir ;