 |
» |
|
|
|
The RENAME command changes the system identification for a
file. You can use this command to change the name of a file, to move a
file from one group to another, or to change the lockword. Syntax |  |
RENAME oldfilereference,newfilereference[,TEMP]
|
Parameters |  |
- oldfile- reference
Specifies the current name of
the file. The form of oldfilereference consists
of the following elements:
filename[/lockword][.groupname[.acctname]]
|
If you specify acctname, the logon account must belong to you; you must be
the creator of the file to rename it. - newfile-reference
Specifies the new name of the file in the same format as
oldfilereference. If you specify acctname, the logon account must
belong to you. If you specify groupname, you must have SAVE access
to the group name. If you omit acctname and/or groupname,
the logon account and/or group are assumed.
Operation Notes |  |
Usage You can enter this command from a session, a job, a program, or in
break mode. Pressing Break does not affect this command. Requirements To rename a file, you must be the file's creator and must have exclusive access
to the file. You cannot rename files that exist in other accounts, unless you
have system administrator capability. This applies to both MPE and HFS
files.
To copy files that exist in other accounts, use the FCOPY command.
Restrictions
You cannot use this command for compatibility
mode KSAM files, because there are internal linkages between the key
information and the data files, however, you can use this command to rename KSAM MPE/iX files. Renaming spool files
The RENAME command renames spool files if you have access to them, but only
for spool files that are not linked to the spooler print queues.
Examples |  |
To change the name of a file named OLDFILE to a file named NEWFILE,
enter: To change the lockword of the file FILE2 from
LOCKA to LOCKB, enter:
:RENAME FILE2/LOCKA,FILE2/LOCKB
|
To move a file from GROUP1 to GROUP2 within the same
account, enter:
:RENAME MYFILE.GROUP1,MYFILE.GROUP2
|
To apply the command as shown above, you must have save access to the
group named in the second parameter (GROUP2). Also, both groups must
reside in the system.
Related Commands |  |
COPY
LISTFILE
LISTSPF
PURGE
|
|