Operating System - OpenVMS
1827807 Members
2326 Online
109969 Solutions
New Discussion

Limitation on number of versions within VMS?

 
SOLVED
Go to solution
Jorge Cocomess
Super Advisor

Limitation on number of versions within VMS?

Hi,

Sorry for asking this dumb question, but I must find out;
Is there a limit on how many version can you within a single directory? What's the default value for numbe rof versions if you don't set to a value (version=7).

Thanks,
J
7 REPLIES 7
John Gillings
Honored Contributor
Solution

Re: Limitation on number of versions within VMS?

Jorge,

The ultimate limit for versions is 32767. If a file with ;32767 exists you cannot create a new version.

The default version limit for a file is the default for the directory. See SET DIRECTORY/VERSION. It's displayed by DIRECTORY/FULL of the directory file.

There is no "default default" so a directory with no version limit is really 32767. A new directory will inherit the version limit of its parent.
A crucible of informative mistakes
Jan van den Ende
Honored Contributor

Re: Limitation on number of versions within VMS?

Jorge,

maybe superfluous, but I think I understand from your question that you are still very inexperienced in VMS, so let me elaborate on Johns answer.


The ultimate limit for versions is 32767. If a file with ;32767 exists you cannot create a new version.

The default version limit for a file is the default for the directory. See SET DIRECTORY/VERSION. It's displayed by DIRECTORY/FULL of the directory file.


This is entirely correct, but fails to mention the big difference between the default, hard limit and the settable limit.

IF version ;32767 is present, there is NO way that you create the next version. (although, if not all 32767 versions are present, it IS possible to specifically address a non-existing version and create THAT).
If however a version limit is set, and you try to create the next version, then first the lowest version will have to be deleted. Ie, a DELETE for it will be issued, and that must succeed (locking & protection must allow it) before the next higher version will be created.

The mechanism is not unlike a M$ or U*X creation of an existing file: you must be able to delete that one before the create can succeed.
In a way, M$ and U*X can be considered to have a hard-coded version limit of 1. :-)

hth,

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jorge Cocomess
Super Advisor

Re: Limitation on number of versions within VMS?

Thank you. This is exactly the answers taht I was hoping for.

Cheers.

J
Arch_Muthiah
Honored Contributor

Re: Limitation on number of versions within VMS?

Jorge,

If it is ODS-1 (VAX only), the max version is 32,767; version limits are not supported.

Also you may be known this....
if you SET the version limit to 3 when there are already 5 versions of that file in your dire, the version limit continue to be 5 unless you specifically delete or purge the files.

Archunan
Regards
Archie
Thomas Ritter
Respected Contributor

Re: Limitation on number of versions within VMS?

Jorge, knowing this magical number is good, but addtionally as a system manager you will need to have in place procedures to detect files which are reaching this number. It is usually not obvious when a process fails as a result of 32767.

We use DFU inside a command procedure.

$ dfu search /version=mini=30000

As version numbers exceed 30000 we commence and investigation.

Thomas
John Gillings
Honored Contributor

Re: Limitation on number of versions within VMS?

>We use DFU inside a command procedure.
>
>$ dfu search /version=mini=30000
>
>As version numbers exceed 30000 we
>commence and investigation.

As of V8.2, the DIRECTORY command can do this too:

$ DIRECTORY/SELECT=VERSION=MINIMUM=number
$ DIRECTORY/SELECT=VERSION=MAXIMUM=number

A neat trick for "resetting" the version sequence of a filename:

$ RENAME file.type;* file_type.TMP;
$ RENAME file_type.TMP;* file.type;

This will renumber all versions of a file to start at 1, preserving the order of the original files. Note the wildcards and semicolons, they are critical.

Be a bit careful as there are potential timing windows if other processes are creating or deleting files while the RENAMEs are proceeding.
A crucible of informative mistakes
Jiri_5
Frequent Advisor

Re: Limitation on number of versions within VMS?

For resetin version number I use command:

$RENAME file.type; file.type;

but it's work only when in directory is only one (last) versin of file


Jirza