RNMOBJ (Rename Object)

RNMOBJ Command syntax diagram

 

Purpose

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 being renamed is in use when the 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

  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
    • System objects
    • CL programs
    • QPRTDEV system value
    • Display descriptions referencing this 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

 

Required Parameters

OBJ
Specifies the current qualified name of the object to be renamed. If no library qualifier is given, *LIBL is used to find the object. The object name should be qualified to ensure that the right object is renamed.

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

*LIBL: All libraries in the thread's library list are searched until the first match is found. Start of changeIf ASPDEV 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 used. If ASPDEV is specified when this value is used, ASPDEV(*) is the only valid value.End of change

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

object-name: Specify the current name of the object to be renamed.

OBJTYPE
Specifies the type of the object to be renamed. More information on this parameter is in commonly used parameters.

Note: Dependent logical files follow the renamed physical file.

NEWOBJ
Specifies the new name of the object being renamed. The object remains in the same library. Enter the new name that identifies the object to the system.

 

Optional Parameters

SYSTEM
Specifies whether the file is on the local system (*LCL), the remote system or systems (*RMT), or on either the local or remote systems (*FILETYPE).

*LCL: The rename is for a file on the local system.

*RMT: The remote file referred to by the source distributed data management (DDM) file is renamed.

Note: If the user wants to rename a remote file, two DDM files must be used. The existing DDM file goes in the OBJ value and the new DDM file goes in the NEWOBJ value. The new DDM file must be in the same library as the existing DDM file. When the remote rename occurs, the remote file name in the existing DDM file is given to the new DDM file.

*FILETYPE: If the OBJ name is a DDM file, the renaming is remote, but if the OBJ name is not a DDM file, the renaming is local.

ASPDEV
Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library of the object or the library being renamed (OBJ parameter). 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 library is used in the rename operation. ASPDEV(*) is the only valid value if *CURLIB or *LIBL is specified for the OBJ parameter. 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/your-library-name) and the ASP device as ASPDEV(auxiliary-storage-pool-device-name).

*: The ASPs that are currently part of the thread's library name space will be searched to locate 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 or secondary ASPs in the ASP group.

*CURASPGRP: If the thread has an ASP group, the primary and secondary ASPs in the ASP group will be searched to locate the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.

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

auxiliary-storage-pool-device-name: The device name of the primary or secondary ASP to be searched to locate 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' for a rename library operation and a status of 'Available' for a rename object operation. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched. End of change

Example for RNMOBJ

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 the user has object operational authority for FILEX and update authority for the PAYROLL library, FILEX is renamed MSTR.

Error messages for RNMOBJ

*ESCAPE Messages

CPFA030
Object already in use.
CPFB8ED
Device description &1 not correct for operation.End of change
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.
CPF2176
Library &1 damaged.
CPF2173
Value for ASPDEV not valid with special value for library.
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.
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.
CPF9833
*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.End of change
CPF9876
Protected library &2 cannot be modified.End of change
CPF9899
Error occurred during processing of command.End of change