RENAME

Generated from C.60.01 /SYS/PUB/CICAT last modified on Thu Jan 11 09:18:52 2001

Back to Main Index


RENAME


     Changes the file name, lockword, and/or group name of a disk file.

SYNTAX


     RENAME oldfilereference,newfilereference[,TEMP]


PARAMETERS


oldfilereference    Current name of file, written in the following
                    format

                    filename[/lockword][.groupname[.acctname]]

                    To use HFS syntax, precede the file name with a
                    dot (.) or slash (/).

newfilereference    New name of file, in the same format as
                    oldfilereference.   If you omit acctname and/or
                    groupname, the logon account and/or group are
                    assumed.

                    To use HFS syntax, precede the file name with a
                    dot (.) or slash (/).

TEMP                Indicates that the old file was, and the new file
                    will be, temporary files. If you do not specify
                    TEMP, RENAME assumes the files are permanent.


OPERATION


     The RENAME command changes the system file identification
     for a permanent or temporary disk file.  You can use it to
     change the name of a file, to change the lockword of an MPE
     file, or to move any file to a different location.

     MPE Files      To rename an MPE file, you must be the file's
                    creator and have exclusive access to the file. If
                    you specify groupname or acctname, you must have
                    save access to the group or account.  Users with
                    System Manager (SM) capability can rename any file
                    to any location on the system.

                    You can use RENAME to move native mode MPE files
                    to HFS directories. You cannot move Compatibility
                    Mode MPE files to HFS directories.  For example,
                    you can use RENAME with KSAM/XL files, but you
                    cannot use it to rename MPE V/E KSAM files.

                    To successfully rename a file across group or
                    account boundaries, you must move it within
                    a single volume set and that volume set must
                    be physically mounted.

                    When you use RENAME to move a file that does not
                    have an ACD to a directory or to another account,
                    an ACD is automatically created for the file to
                    ensure that it is protected by the appropriate file
                    access matrix of its new location.

     HFS Files      To rename a file in an HFS directory, you must
                    have delete directory entry access (DD) to the
                    old directory and create directory entry access
                    (CD) to the new directory.

                    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.


     This command may be issued from a session, job, program, or
     in BREAK.  Pressing [Break] has no effect on this command.


EXAMPLE(S)


     Since temporary files exist only for the duration of your
     current job or session, their fully qualified filenames
     correspond to your logon group and account.  To change the
     name of a temporary file from OLDFILE to NEWFILE, and
     reassign it to the group NEW, enter

     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.  To move the file MYFILE from
     GROUP1 to GROUP2, for example, you would enter

     RENAME MYFILE.GROUP1,MYFILE.GROUP2

     To use RENAME in this way, you must have SAVE access to the
     group named in the second parameter (GROUP2 in the previous
     example).  In addition, both groups must be in the system
     domain or must both reside on the same volume set.

     In the following example, the file "/dir2/doc/print.txt" under
     CWD is renamed to the file "MYFILE" in the PUB group of the
     SYS account.

     RENAME ./dir2/doc/print.txt, MYFILE.PUB.SYS


ADDITIONAL INFORMATION


Commands:   COPY, PURGE


Back to Main Index