Rename Object (RNMOBJ)

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:

  1. You must have object management (*OBJMGT) authority for the object that is to be renamed and have update (*UPDATE) and execute (*EXECUTE) authorities for the library in which the object is located.

  2. When a library contains one of the following object types, it cannot be renamed: *CRG, *DTADCT, *JRN, *JRNRCV, *SQLPKG, and *SQLUDT.

  3. A PL/I program cannot be renamed after it has been created.

  4. Configuration objects including controller descriptions, line descriptions, device descriptions, and network interface descriptions must be varied off in order be renamed.

  5. The following objects cannot be renamed:

    • The job's temporary library (QTEMP)

    • The following system libraries (where xxxxx is a 5-digit number):

      • QSYS or QSYSxxxxx

      • QSYS2 or QSYS2xxxxx

      • QRCL or QRCLxxxxx

      • QRECOVERY or QRCYxxxxx

      • SYSIBM or SYSIBxxxxx

      • QQALIB

      • QSYSCGI

    • The system operator message queue (QSYSOPR)

    • All work station user message queues

    • The system log (QHST)

    • The configuration objects (QCTL and QCONSOLE)

    • The configuration lists (QAPPNRMT, QAPPNLCL, QASYNCLOC, QRTLPASTHR)

    • The Electronic Customer Support configuration objects (QESLINE, QESPAP, QESCTL. QTILINE, QTICTL, QTIDA, QTIDA2, QIADSP, QIAPRT, QQAHOST)

  6. A user library cannot be renamed to any of the following (where xxxxx is a 5-digit number):

    • QSYSxxxxx

    • QSYS or QSYS2xxxxx

    • QRCL or QRCLxxxxx

    • QRECOVERY or QRCYxxxxx

    • SYSIBM or SYSIBxxxxx

    • QTEMP

  7. When renaming objects of type *CSI, *GSS, *FNTRSC, *FORMDF, *OVL, *PAGDFN, and *PAGSEG, the new name for the object cannot exceed 8 characters in length.

  8. This command is conditionally threadsafe. The following restrictions apply:

    • In multithreaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA. This command is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETYPE) is specified.

    • Renaming objects of type *CFGL, *CNNL, *CTLD, *DEVD, *LIND or *NWID will fail in multithreaded jobs.

NOTES:

  1. References made to the following items may need to be updated by the user after a rename of a configuration object:

    • Connection lists

    • Work station entries

    • Communication entries

    • Display files

    • Printer files

    • Tape files

    • Diskette files

    • ICF files

    • User profiles

    • Job descriptions

    • CL programs

    • QPRTDEV system value

    • Display descriptions referencing it as an auxiliary printer

    • Communication side information (CSI) objects

    • Distributed data management files (APPC device name)

    • Integrated services digital network (ISDN) controller descriptions that refer to a renamed connection list (CNNL)

    • ISDN line descriptions that refer to a renamed CNNL

    • Other configuration objects. For example, lines, controllers, and other devices that refer to the renamed configuration objects

  2. References made to the renamed object by the following items are automatically changed by the system after a rename operation. The reference changes reflect the changes made to the renamed configuration objects.

    • QCONSOLE system values

    • message queues associated with display devices

    • System/36 environment device tables

    • output queues associated with the old printer device

    • local work station controllers associated with a twinaxial data link control (TDLC) line

    • TDLC lines associated with the local or remote work station controller

Top


 

Parameters

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

 

Object (OBJ)

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

name

Specify the name of the object to be renamed.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found. If the ASP device (ASPDEV) parameter is specified when this value is used, ASPDEV(*) is the only valid value.

*CURLIB

The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched. If the ASP device (ASPDEV) parameter is specified when this value is used, ASPDEV(*) is the only valid value.

name

Specify the name of the library to be searched.

Top

 

Object type (OBJTYPE)

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.

object-type

Specify the object type of the object to be renamed.

Top

 

New object (NEWOBJ)

Specifies the new name of the object to be renamed. The object remains in the same library.

This is a required parameter.

name

Specify the new name of the object.

Top

 

ASP device (ASPDEV)

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).

ASPDEV(*) is the only valid value when *LIBL or *CURLIB is specified for the library (qualifier 2) of the Object (OBJ) parameter.

*

The ASPs that are currently part of the thread's library name space will be searched to find the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.

*CURASPGRP

If the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group will be searched to find the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched. If no ASP group is associated with the thread an error will be issued.

*SYSBAS

The system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to find the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.

name

Specify the name of the primary or secondary ASP device to be searched to find the library. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Active' or 'Available'. The system ASP (1) and defined basic user ASPs (2-32) will not be searched.

To specify a specific auxiliary storage pool (ASP) device name, have use (*USE) authority for each ASP device in the ASP group.

Top

 

System (SYSTEM)

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.

*LCL

The file on the local system is renamed.

*RMT

The remote file referred to by the source DDM file is renamed.

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.

*FILETYPE

If the name in the OBJ parameter is a DDM file, the rename will be a remote rename. If the name in the OBJ parameter is not a DDM file, the rename will be a local rename.

Top


 

Examples

 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


 

Error messages

*ESCAPE Messages

CPFA030

Object already in use.

CPFB8ED

Device description &1 not correct for operation.

CPF0601

Not allowed to do operation to file &1 in &2.

CPF0602

File &1 already in library &2.

CPF0605

Device file &1 in &2 saved with storage freed.

CPF0610

File &1 in &2 not available.

CPF0678

Operation not performed for file name &1 in &2.

CPF1763

Cannot allocate one or more libraries.

CPF180B

Function &1 not allowed.

CPF2105

Object &1 in &2 type *&3 not found.

CPF2110

Library &1 not found.

CPF2111

Library &1 already exists.

CPF2112

Object &1 in &2 type *&3 already exists.

CPF2113

Cannot allocate library &1.

CPF2114

Cannot allocate object &1 in &2 type *&3.

CPF2132

Object &1 already exists in library &2.

CPF2136

Renaming library &1 failed.

CPF2139

Rename of library &1 failed.

CPF2140

Rename of library &1 previously failed.

CPF2150

Object information function failed.

CPF2151

Operation failed for &2 in &1 type *&3.

CPF2160

Object type *&1 not eligible for requested function.

CPF2164

Rename of library &2 not complete.

CPF2166

Library name &1 not valid.

CPF2173

Value for ASPDEV not valid with special value for library.

CPF2176

Library &1 damaged.

CPF218C

&1 not a primary or secondary ASP.

CPF2182

Not authorized to library &1.

CPF2189

Not authorized to object &1 in &2 type *&3.

CPF2190

Not able to do remote delete or rename request.

CPF22BC

Object &1 type &3 is not program defined.

CPF2451

Message queue &1 is allocated to another job.

CPF2512

Operation not allowed for message queue &1.

CPF2691

Rename of &2 type *&5 did not complete.

CPF2692

Object &2 type *&5 must be varied off.

CPF2693

&2 type *&5 cannot be used for rename.

CPF2694

Object &2 type *&5 cannot be renamed.

CPF2696

Object &2 type *&5 not renamed.

CPF320B

Operation was not valid for database file &1.

CPF3201

File &1 in library &2 already exists.

CPF3202

File &1 in library &2 in use.

CPF3203

Cannot allocate object for file &1 in &2.

CPF322D

Operation not done for data base file &1.

CPF3220

Cannot do operation on file &1 in &2.

CPF323C

QRECOVERY library could not be allocated.

CPF323D

User does not have correct authority.

CPF324C

Concurrent authority holder operation prevents move, rename or restore.

CPF3245

Damage to file &1 member &6 prevents operation on file &3.

CPF326A

Operation not successful for file &1 in library &2.

CPF327F

Operation not successful for file &1 in library &2.

CPF329D

Operation not successful for file &1 in library &2.

CPF3323

Job queue &1 in &2 already exists.

CPF3330

Necessary resource not available.

CPF3353

Output queue &1 in &2 already exists.

CPF3375

Job queue &1 in &2 not renamed. Job queue in use.

CPF3376

Output queue &1 in &2 not renamed. Output queue in use.

CPF3467

Output queue &1 deleted and then created again.

CPF3469

Operation not allowed for output queue.

CPF5702

File either not DDM file or not found.

CPF7003

Entry not journaled to journal &1. Reason code &3.

CPF8D05

Library &1 already exists.

CPF88C4

Value &1 for new object is more than 8 characters.

CPF9801

Object &2 in library &3 not found.

CPF9803

Cannot allocate object &2 in library &3.

CPF9807

One or more libraries in library list deleted.

CPF9808

Cannot allocate one or more libraries on library list.

CPF9809

Library &1 cannot be accessed.

CPF9814

Device &1 not found.

CPF9825

Not authorized to device &1.

CPF9830

Cannot assign library &1.

CPF9833

*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.

CPF9876

Protected library &2 cannot be modified.

Top