Command reference / object

RNMOBJ

Rename Object

Changes the name of an object in a library. The new name must be unique for that object type in the library. An object that is in use is not renamed. If a library on an active user's library list is renamed, DSPLIBL shows the new name. Renaming a library can cause programming errors, so it is not recommended. If the object is journaled, a journal entry records the change.

Allowed environments: *ALL. Positional parameters: 4.

Restrictions

Parameters

OBJ Object

Specifies the object to be renamed. If the library is not specified, *LIBL is used. Specifying the library ensures the correct object is renamed. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*LIBL
All libraries in the thread's library list are searched until the first match is found. If ASPDEV is specified with this value, ASPDEV(*) is the only valid value.
*CURLIB
The current library for the thread is searched. If none is set, QGPL is searched. If ASPDEV is specified, ASPDEV(*) is the only valid value.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OBJTYPE Object type

Specifies the object type of the object to be renamed. This is a required parameter.

Type
*CHAR
Required
Yes
Length
7
Case
Uppercase

Allowed values: *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

NEWOBJ New object

Specifies the new name for the object. The object stays in the same library. This is a required parameter.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

ASPDEV ASP device

Specifies the ASP device where storage is allocated for the library containing the object. Specify it when the library is in an ASP outside the thread's library name space.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *CURASPGRP, *SYSBAS

*
Searches the ASPs currently in the thread's library name space: the system ASP (ASP 1), basic user ASPs (2-32), and the primary and secondary ASPs of the thread's ASP group if it has one.
*CURASPGRP
Searches only the primary and secondary ASPs of the thread's ASP group. An error is issued if the thread has no ASP group.
*SYSBAS
Searches the system ASP (ASP 1) and basic user ASPs (2-32) only, even if the thread has an ASP group.

SYSTEM System

Specifies whether the rename is done on the local system or a remote system, when the object is a Distributed Data Management (DDM) file.

Type
*CHAR
Required
No
Default
*LCL
Length
9
Case
Uppercase

Allowed values: *LCL, *RMT, *FILETYPE

*LCL
The file on the local system is renamed.
*RMT
The remote file referred to by the source DDM file is renamed.
*FILETYPE
If OBJ names a DDM file the rename is remote; if it does not, the rename is local.

Examples

RNMOBJ OBJ(PAYROLL/FILEX) OBJTYPE(*FILE) NEWOBJ(MSTR)

Searches library PAYROLL for file FILEX. If found and authority allows, renames FILEX to MSTR.

IBM command documentation

Generated from os/cl/catalog/RNMOBJ.json and os/cl/help/RNMOBJ.json.