DCL Tip: Resetting File Version Numbers Lower

DCL Tip: Resetting File Version Numbers Lower
Tagged: DCL  •  File Systems  •  OpenVMS  •  Tips

If you want to reset the version numbers of a series of OpenVMS RMS files back down to a lower (and contiguous) series of versions, you can use the following two DCL commands:
$ RENAME filename.ext;* TEMPORARY.TMP;
$ RENAME TEMPORARY.TMP;* filename.ext;

The command sequence renames the files to the lowest version numbers, while retaining the original order. If you have three version present for the target file, the versions resulting from the RENAME sequence will be ;3, ;2, and ;1.

Key here is the exact specification of the versions with and without the wildcards, as shown in the above sequence.

The sequence assumes the files are not active, and that there is no parallel creation or deletion activity occurring with the targeted filenames.

To identify and to manage file versions approaching ;32767 — the largest version number permitted on OpenVMS with the ODS-2 and ODS-5 volume structures — you can use the Freeware DFU package and the SEARCH /VERSION=MINIMUM=n command, or you can use the DCL command DIRECTORY /SELECT=VERSION=MINIMUM=n command available on OpenVMS V8.2 and later.

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章