Operating System - OpenVMS
1753792 Members
7042 Online
108799 Solutions
New Discussion юеВ

File Version Limit on VMS

 
SOLVED
Go to solution
M C_1
Advisor

File Version Limit on VMS

Does anyone know of a utility that exists that will help manage the file version limit issue on VMS (no more than 32767)? I have written a utility in DCL that searches for files that have a version above 10,000 and notifies me if it finds any but its less than perfect.

I checked the VMS Freeware CD 5 but did not find anything that matched what I was looking for.

Any thoughts?
It is what it is!
13 REPLIES 13
Lokesh_2
Esteemed Contributor

Re: File Version Limit on VMS

Hi,

You can use $set file/version_limit to limit number of versions of any file. Once the no. of files crosses this number, earlier files got deleted. You can set the same for directories.

See online help on SET FILE/VERSION_LIMIT for more details.

HTH,
Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
Martin P.J. Zinser
Honored Contributor
Solution

Re: File Version Limit on VMS

Hello,

Version_limit does not help in this case, it just meams your file will not have more than x versions at any one time on disk, but the number will increase anyhow.

You might want to have a look at

http://dcl.openvms.org/stories.php?story=03/11/03/5533108

Haven't tested this by myself...

Greetings, Martin
M C_1
Advisor

Re: File Version Limit on VMS

Yes, I did see the help on SET FILE/VER and that works as expected however, the problem I face is once a file get created and its at version 32767 the next creation of the file fails. I was looking for a utility that would search my disks looking for files that could potentially run into this problem.

For example:

NODEX$ create test.txt;32765
EXIT
TCHID1$ set file/ver=2 test.txt
TCHID1$ dir test.txt

Directory TECH:[SYS]

TEST.TXT;32765

Total of 1 file.
NODEX$ create test.txt
Exit
NODEX$ dir test.txt

Directory TECH:[SYS]

TEST.TXT;32766 TEST.TXT;32765

Total of 2 files.
NODEX$ create test.txt
Exit
NODEX$ dir test.txt

Directory TECH:[SYS]

TEST.TXT;32767 TEST.TXT;32766

Total of 2 files.
NODEX$ create test.txt

NODEX$ create test.txt
%CREATE-E-OPENOUT, error opening TECH:[SYSMRC]TEST.TXT; as output
-RMS-E-CRE, ACP file create failed
-SYSTEM-W-BADFILEVER, bad file version number

Thanks - MC
It is what it is!
M C_1
Advisor

Re: File Version Limit on VMS

Martin - This is more what I am looking for. Only I wanted somthing that would search the disks rather than one file. I guess I could modify it to work for the disks.

Thanks for the info

MC
It is what it is!
labadie_1
Honored Contributor

Re: File Version Limit on VMS

I think DFU does the job, among many things.

http://h71000.www7.hp.com/freeware/freeware50/dfu027a/

The doc is at
http://h71000.www7.hp.com/freeware/freeware50/dfu027a/dfu027a.html

You can write some Dcl using f$device to find your disks, f$getdvi to check it is mounted and available, and then issue a DFU search disk /version=(min=10000,max=32767)
Karl Rohwedder
Honored Contributor

Re: File Version Limit on VMS

We use a little DCL procedure during login to check for logfiles, purge them to a selectable number and rename the rest to version 1 up to N. I've attached it, may be it has some value to you.
Willem Grooters
Honored Contributor

Re: File Version Limit on VMS

Basiccally, if you just need the version number:

FILE = f$search()
VERS = f$parse (FILE,,,"VERSION") - ";"

vrs will now hold the version number.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Ian Miller.
Honored Contributor

Re: File Version Limit on VMS

A newer DFU can be found
http://h71000.www7.hp.com/freeware/freeware60/dfu/

This utility is very handy and should be installed on every VMS system (you can just copy DFU.EXE - at least with V2.7 that worked). Parhaps hp could start including it with the base o.s.
____________________
Purely Personal Opinion
Jan van den Ende
Honored Contributor

Re: File Version Limit on VMS

Hello from Holland.

Just testing ALL files on ALL disks for their version number wil be a VERY heavy job on bigger systems!.
We hitchhike a little on the fact that we make listings during Backup, and a little DCL procedure that SEARCHes those listings for ";3" (all files with versions starting with the digit 3) into a file, then processing this file to keep just those with a string length 5 after the semicolon gives all files with version over 30000.
IF you are using Backup with .LIS=xx, then this is MUCH more efficient.
I know (from Guy Peleg, who is doing DCL extensions) DCL is getting and extra command or qualifier to address just this problem, but I am not sure whether it is already in 7.3-2 (we're still waiting for that), or if it will be in an ECO kit. So maybe just a little patience (and an update/upgrade) will do the job as well or better
When I get back in the office, I'll attach our procedure.
Don't rust yours pelled jacker to fine doll missed aches.