Renames an entire file or data section.
Note: Use MOVE-FILE to rename an account.
TCL-I command.
The syntax used depends on what is being renamed. For example:
RENAME-FILE file-name1
TO:file-name2
RENAME-FILE file-name1,
data-section-name1
TO:data-section-name2
file-name1 is the current name of the file you want to rename.
file-name2 is the new name you want to give to the dictionary and default data section.
data-section-name1
is the current name of the data section you want to rename.
data-section-name2
is the new name you want to give to the data section.
A dictionary cannot be renamed without the data section, that is, you cannot specify DICT file-name.
If you are renaming a non-default data section, you need to
specify both the dictionary name (file-name1) and the data section name (data-section-name1)
in the RENAME-FILE command. Do not specify both names at the
TO:
prompt. Only specify the new data section name (data-section-name2).
:RENAME-FILE OLDFILE
TO:NEWFILE
The software responds:
The file that formerly resided in the "CURRENT" account and was called "OLDFILE" now resides in the "CURRENT" account and is called "NEWFILE"
The file definition item in the MD for OLDFILE had the item-id changed to NEWFILE. Also, the data level descriptor OLDFILE in the DICT (if there is one) had the item-id changed to NEWFILE.
:RENAME-FILE OLDFILE,SECTION.1
TO:SECTION.A
The software responds:
The data section that formerly resided in the "CURRENT" account as a data section of the "OLDFILE" file and was called "SECTION.1" now resides in the "CURRENT" account as a data section of the "OLDFILE" file and is called "SECTION.A"
The item-id of the data level descriptor SECTION.1 in the dictionary OLDFILE has been changed to SECTION.A.