RNMM (Rename Member)

RNMM Command syntax diagram

 

Purpose

The Rename Member (RNMM) command changes the name of a specified file member. The member cannot be renamed while it is in use; other users can read and change records of other members in the file that contains the member being renamed. A member that is opened in the same job cannot be renamed.

 

Restrictions

  1. To rename a file member, the user must have *ALL authority to the object being renamed and to the library in which the object is located.
  2. In multithreaded jobs, this command is not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA.

 

Required Parameters

FILE
Specifies the qualified name of the database file (physical or logical) that contains the member being renamed.

The name of the file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

database-file-name: Specify the name of the physical or logical database that contains the member being renamed.

MBR
Specifies the name of the physical or logical file member that is renamed. Specify the name of the member.
NEWMBR
Specifies the new name of the member being renamed. The member remains in the same file. Specify the name of the new member. The new name must be unique in the file.

Example for RNMM

RNMM  FILE(ELEMENT)  MBR(LEAD)  NEWMBR(GOLD)

This command renames member LEAD in file ELEMENT as GOLD. The library list (*LIBL) is used to find the file.

Error messages for RNMM

*ESCAPE Messages

CPF3178
Member &3 not renamed to &4.