Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
The Rename Object (RNMOBJ) command changes the name of an object in a library. The new name specified for the object must be unique in the library for the object type. If the object to be renamed is in use when this command is entered, the object is not renamed. If a library is on an active user's library list when the library is renamed, a Display Library List (DSPLIBL) command reflects the new name. Renaming a library can cause programming errors. Therefore, it is not recommended.
Restrictions:
NOTES:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
OBJ | Object | Qualified object name | Required, Positional 1 |
Qualifier 1: Object | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OBJTYPE | Object type | *ALRTBL, *AUTL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CNNL, *CRQD, *CSI, *CSPMAP, *CSPTBL, *CTLD, *DEVD, *DTAARA, *DTAQ, *EDTD, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IMGCLG, *IPXD, *JOBD, *JOBQ, *LIB, *LIND, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODULE, *MSGF, *MSGQ, *M36, *M36CFG, *NODGRP, *NODL, *NTBD, *NWID, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SPADCT, *SRVPGM, *SSND, *TBL, *USRIDX, *USRQ, *USRSPC, *VLDL, *WSCST | Required, Positional 2 |
NEWOBJ | New object | Name | Required, Positional 3 |
ASPDEV | ASP device | Name, *, *CURASPGRP, *SYSBAS | Optional |
SYSTEM | System | *LCL, *RMT, *FILETYPE | Optional, Positional 4 |
Top |
Specifies the object to be renamed. If the library (qualifier 2) is not specified, *LIBL is used. A library name can be specified for qualifier 2 to ensure that the correct object is renamed.
This is a required parameter.
Qualifier 1: Object
Qualifier 2: Library
Top |
Specifies the object type of the object to be renamed.
To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt). For a description of the object types, see "Object types" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
This is a required parameter.
Top |
Specifies the new name of the object to be renamed. The object remains in the same library.
This is a required parameter.
Top |
Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library containing the object to be renamed. If the library is in an ASP that is not part of the thread's library name space, this parameter must be specified to ensure the correct object is renamed. If a library to be renamed is in an auxiliary storage pool (ASP) device that is not currently part of the thread's library name space, specify the library as OBJ(QSYS/name), the object type as OBJTYPE(*LIB), and the ASP device as ASPDEV(name).
Note: ASPDEV(*) is the only valid value when *LIBL or *CURLIB is specified for the library (qualifier 2) of the Object (OBJ) parameter.
Note: To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
Top |
Specifies if the rename is to be done on the local system or on a remote system, if the file is a Distributed Data Management (DDM) file.
Note: If you want to rename a remote file, two DDM files must be used. The existing DDM file is specified for the Object (OBJ) parameter, and the new DDM file is specified for the New object (NEWOBJ) parameter. The new DDM file must be in the same library as the existing DDM file. When the remote rename occurs, it is the remote file name in the existing DDM file that is renamed to the new DDM file name.
Top |
RNMOBJ OBJ(PAYROLL/FILEX) OBJTYPE(*FILE) NEWOBJ(MSTR)
The library named PAYROLL is searched for the file named FILEX. If the file is found, and you have object operational (*OBJOPR) authority for FILEX and update (*UPD) authority for the PAYROLL library, FILEX is renamed MSTR.
Top |
*ESCAPE Messages
Top |