Use FileRename to change the name of an existing file.
FileRename may also be entered as FileRen[ame], RenameFile, RenFile, or Ren[ame].
Required Operands
SRC is the existing BIM, workstation, PDS, or VSE file name.
DEST is the new file name. A file having the destination name must not already exist.
If an asterisk (*) is entered as part of DEST, the asterisk is replaced with the SRC file name. This offers an easy way of moving a file from one directory to another (supported only for BIM files) or adding a suffix or prefix to a name without keying the file name twice (see Examples).
If SRC (and DEST) is a Host file, and if file synchronization (see File Synchronization Facility) is active for the file, the corresponding workstation file is renamed as well. The opposite is not true, i.e., if FILE is a workstation file, and if file synchronization is active for the file, the corresponding Host file is not renamed.
FileRename sets the last referenced file to DEST.
When Valid
For host files, the user must have DEF access level for both the SRC directory and the DEST directory.
SRC cannot be currently undergoing editing or listing. SRC cannot be either the slave or the master in a checkout relationship.
Return Codes
OK Successful.
CK SRC file is part of a checkout relationship.
DP DEST file already exists.
ED SRC file is being edited.
LI SRC file has active List session(s).
NF One of the following:
SRC file not found.
DEST directory not found.
SC Inadequate access level.
Procedure Notes
FileRename sets the TXM variables to the attributes of DEST.
Examples
Rename PDS file SYRINT1 to TKRINT1:
=> ren syrint1,tkrint1
Move BIM file XMRLL21 to directory 4216:
=> ren xmrll21,4216.xmrll21 -or- => ren xmrll21,4216.*