User Tools

Site Tools


ibm:vm370-lib:cmshelp:rename.helpcmd

RENAME

CMS Commands

rename.helpcmd.txt
RENAME                                                    CMS Transient command

Use the RENAME command to change the fileid of one or more CMS files
on a read/write CMS disk.  The format of the RENAME command is:
+----------+------------------------------------------------------------------+
| Rename   | fileid1 fileid2 [([NOType|Type]  [UPdirt|NOUPdirt][)]]           |
+----------+------------------------------------------------------------------+
where:

fileid1  is the file identifier of the original file whose name is to be
         changed.  All components of the fileid (filename, filetype, and
         filemode) must be coded, with either a name or an asterisk.  If an
         asterisk is coded in any field, any file that satisfies the other
         qualifications is renamed.

fileid2  is the new file identifier of the file.  All components of the file
         (filename, filetype, and filemode) must be coded, with either a name
         or an equal sign; if an equal sign (=) is coded, the corresponding
         file identifier is unchanged.  The output filemode can also be
         specified as an asterisk (*), indicating that the filemode is not
         changed.

Options:

NOType | Type
         displays, at the terminal, the new identifiers of all the files that
         are renamed.  The file identifiers are displayed only when an asterisk
         is specified for one or more of the file identifiers (fn, ft, or fm)
         in fileid1.  NOType suppresses this display, and is the default.

UPdirt | NOUPdirt
         updates the master file directory upon completion of this command.
         This is the default.  NOUPdirt suppresses this updating.  (See Usage
         Note 3.)


Usage notes:

1.  When you code an asterisk (*) in any portion of the input fileid, any or
    all of the files that satisfy the other qualifiers may be renamed,
    depending upon how you specify the output fileid.  For example:
       rename * assemble a test file a
    results in the first ASSEMBLE file found on the A-disk being renamed to
    TEST FILE.  If more than one ASSEMBLE file exists, error messages are
    issued to indicate that they cannot be renamed.

    If you code an equal sign (=) in an output fileid in a position
    corresponding to an asterisk in an input fileid, all files that satisfy the
    condition are renamed.  For example:
       rename * assemble a = oldasm =
    renames all files with a filetype of ASSEMBLE to files with a filetype of
    OLDASM.  Current filenames are retained.

2.  You cannot use the RENAME command to move a file from one disk to another.
    You must use the COPYFILE command if you want to change filemode letters.

    You can use the RENAME command to modify filemode numbers, for example,
       rename * module a1 = = a2
    changes the filemode number on all MODULE files that have a mode number of
    1 to a mode number of 2.

3.  Normally, the file directory for a CMS disk is updated whenever you issue a
    command that affects files on the disk.  When you use the NOUPDIRT option
    of the RENAME command, the file directory is not updated until you issue a
    command that writes, updates, or deletes any file on the disk, or until you
    explicitly release the disk (with the RELEASE command).

Responses:

newfn newft newfm
    The new filename, filetype, and filemode of each file altered is  displayed
    when the TYPE option is specified and an asterisk was specified for at
    least one of the file identifiers (fn, ft or fm) of the input fileid.
ibm/vm370-lib/cmshelp/rename.helpcmd.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator