Operating System - OpenVMS
1754020 Members
7876 Online
108811 Solutions
New Discussion юеВ

Re: investigating file version limits

 
SOLVED
Go to solution
Mark Schafer_2
Advisor

investigating file version limits

Why aren't the following 2 commands equivalent?

$ set file/attr=vrs:30 login.com;
$ set file/ver=30 login.com;

The first doesn't seem to do anything, while the last sets the version limit to 30, as shown by DIR/FULL.

The real goal is writing a program to read and set the version limit, but that's another question.
5 REPLIES 5
Kris Clippeleyr
Honored Contributor

Re: investigating file version limits

Marc,

According to the online HELP, SET FILE/ATTR=VRS:n corresponds to the ACP-QIO File Attribute FAT$W_VERSIONS, and to the XAB$W_VERLIMIT field of the XABFHC for RMS.
According to the I/O Users Reference Manual, FAT$W_VERSIONS only applies to directory files.
The RMS manual states that the XAB$W_VERLIMIT field of the XABFHC is an output field.
So maybe this clarifies why your first command doesn't have any effect.

Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Mark Schafer_2
Advisor

Re: investigating file version limits

okay, I agree that's what the documentation says. However, what did command #1 do? It did something!

$ set watch file/class=directory
$ set file/ver=30 login.com;
%XQP, Thread #0, Read only directory access (1828,1,0)
%XQP, Thread #0, Directory scan for: LOGIN.COM;0, Status: 00000000
%XQP, Thread #0, Read only directory access (1678,1,0)
%XQP, Thread #0, Directory scan for: LOGIN.COM;0, Status: 00000001
%XQP, Thread #0, Read only directory access (1828,1,0)
%XQP, Thread #0, Directory scan for: LOGIN.COM;0, Status: 00000000
%XQP, Thread #0, Read only directory access (1678,1,0)
%XQP, Thread #0, Directory scan for: LOGIN.COM;0, Status: 00000001
%XQP, Thread #0, Read/write directory access (1678,1,0)
%XQP, Thread #0, Directory scan for: .;0, Status: 00000001
Kris Clippeleyr
Honored Contributor
Solution

Re: investigating file version limits

Mark,


However, what did command #1 do? It did something!

Indeed, it changed the revision/modification date. I don't think it did anything else.

Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Kris Clippeleyr
Honored Contributor

Re: investigating file version limits

Marc,
Hit the submit button too soon.
If you execute command #1 on a directory file, it does what it should, setting the default version limit for the directory to the number specified (note that specifying a zero ( 0 ), turns the default version limit off again).
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Volker Halle
Honored Contributor

Re: investigating file version limits

Mark,

the SET FILE/ATTR=VRS:30 seems to be a noop, if executed against a non-directory file.

A '%SET-I-NOTDIR, file is not a directory' message would have been nice.

SET FILE/VERSION_LIMIT=5 X.DIR against a .DIR file also seems to be a noop.

Volker.