MPE/iX Commands Reference Manual (32650-90864)

476 Chapter 6
Command Definitions P-R
RENAME
Files in HFS directories can be renamed to files in the MPE account group
structure, and they can be renamed to files in other HFS directories.
You cannot rename a directory. If either oldfilereference or newfilereference is
actually a directory, you will get an error.
Spool Files If you have access to spoolfiles, you can rename them. In this case, the
name of the file changes, but the contents and links to the spooler remain
the same.
Use
This command may be issued from a session, a job, a program, or in BREAK. Pressing
Break has no effect on this command.
Examples
Since temporary files exist only for the duration of your current job or session, their fully
qualified file names correspond to your logon group and account. The following example
shows the command entry to change the name of a temporary file from OLDFILE to
NEWFILE, and reassign it to the group NEWG.
RENAME OLDFILE,NEWFILE.NEWG,TEMP
To change the lockword of the permanent file FILE2 from LOCKA to LOCKB, enter:
RENAME FILE2/LOCKA,FILE2/LOCKB
To transfer a file from one group to another within the same account, use the RENAME
command, simply naming the new group in the second parameter. You must have SAVE
access to GROUP2 and both groups must be in the system domain or reside on the same
volume set. For example, to move the file MYFILE from GROUP1 to GROUP2, enter:
RENAME MYFILE.GROUP1,MYFILE.GROUP2
The following command renames the file dir2/doc/print.txt in the current working
directory (CWD) to MYFILE in the group and account MYGROUP.MYACCT.
RENAME ./dir2/doc/print.txt, MYFILE.MYGROUP.MYACCT
The following command renames the file FILE1 in the PUB group to new_txt in the HFS
directory dir1 under the root directory.
RENAME FILE1.PUB, /dir1/new_txt
The following command renames the KSAM XL file KSFILE in the PUB group to ksfile in
the HFS directory dir1 under the root directory.
RENAME KSFILE.PUB, /dir1/ksfile
Related Information
Commands BUILD, COPY, PURGE, PRINT
Manuals None