Change Object Description (CHGOBJD)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change Object Description (CHGOBJD) command can change the text description of an object or reset the days used count to 0 (zero) for the specified objects.

If the object being changed is currently journaled, an entry is written to the journal recording the change.

For additional information regarding journaling, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Restrictions:

  1. For file objects, have object operational (*OBJOPR) and object management (*OBJMGT) authorities for the object to be changed.

  2. For non-file objects, have object management (*OBJMGT) authority for the object to be changed.

  3. You must have execute (*EXECUTE) authority for the library where the object is located.

If you do not specify at least one of the Text 'description' (TEXT) or Days used count (USECOUNT) parameters, completion message CPC2105 is sent to indicate that the object was not changed.

Top


 

Parameters

Keyword Description Choices Notes
OBJ Object Qualified object name Required, Key, Positional 1
Qualifier 1: Object Generic name, name, *ALL
Qualifier 2: Library Name, *LIBL, *USRLIBL, *CURLIB, *ALL, *ALLUSR
OBJTYPE Object type *ALL, *ALRTBL, *AUTL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CNNL, *COSD, *CRG, *CRQD, *CSI, *CSPMAP, *CSPTBL, *CTLD, *DEVD, *DTAARA, *DTADCT, *DTAQ, *EDTD, *EXITRG, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IGCTBL, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JOBSCD, *JRN, *JRNRCV, *LIB, *LIND, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODD, *MODULE, *MSGF, *MSGQ, *M36, *M36CFG, *NODGRP, *NODL, *NTBD, *NWID, *NWSCFG, *NWSD, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SPADCT, *SQLPKG, *SQLUDT, *SRVPGM, *SSND, *SVRSTG, *S36, *TBL, *TIMZON, *USRIDX, *USRPRF, *USRQ, *USRSPC, *VLDL, *WSCST Required, Key, Positional 2
TEXT Text 'description' Character value, *SAME, *BLANK Optional, Positional 3
USECOUNT Days used count *NORESET, *RESET Optional

Top

 

Object (OBJ)

Specifies the object whose description is to be changed. If qualifier 2 is not specified, *LIBL is searched to find the specified object. A library name can be specified for qualifier 2 to ensure that the correct object is changed.

To change the object description for objects of type *DEVD, you should first use the Allocate Object (ALCOBJ) command to obtain an *EXCLRD lock state on the device description. If this is not done, a CPF2114 message is sent, which indicates that the device description is locked. The ALCOBJ command does not have to be used if you are already signed on the display device for which the description is to be changed.

This is a required parameter.

Qualifier 1: Object

*ALL

All objects in the libraries identified in the library qualifier that are of the types specified for the Object type (OBJTYPE) parameter are to be changed.

generic-name

Specify the generic name of the objects to be changed. A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). A generic name specifies all objects that have names with the same prefix as the generic object name for which you have the proper authority.

name

Specify the name of the objects to be changed.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*USRLIBL

If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched.

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

*ALL

All the libraries in the thread's library name space, including QSYS, are searched.

*ALLUSR

All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:

 #CGULIB     #DSULIB     #SEULIB #COBLIB     #RPGLIB #DFULIB     #SDALIB 

Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:

 QDSNX       QRCLxxxxx   QUSRIJS     QUSRVxRxMx QGPL        QSRVAGT     QUSRINFSKR QGPL38      QSYS2       QUSRNOTES QMGTC       QSYS2xxxxx  QUSROND QMGTC2      QS36F       QUSRPOSGS QMPGDATA    QUSER38     QUSRPOSSA QMQMDATA    QUSRADSM    QUSRPYMSVR QMQMPROC    QUSRBRM     QUSRRDARS QPFRDATA    QUSRDIRCL   QUSRSYS QRCL        QUSRDIRDB   QUSRVI 

  1. 'xxxxx' is the number of a primary auxiliary storage pool (ASP).

  2. A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.

name

Specify the name of the library to be searched.

Top

 

Object type (OBJTYPE)

Specifies the object type of the objects to be changed.

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 type of objects to be changed.

*ALL

All types of objects that have the name and library specified for the Object (OBJ) parameter and for which you have authority are to be changed.

Top

 

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*SAME

The text does not change.

*BLANK

The text is set to blanks.

'description'

Specify no more than 50 characters, enclosed in apostrophes.

Top

 

Days used count (USECOUNT)

Specifies whether the days used count for the objects is to be reset.

*NORESET

The days used count for the objects is not to be reset.

*RESET

The days used count for the objects is to be reset to zero (0). The reset date is to be updated to the current system date.

For database files, the days used count and reset date are updated for all members in the file.

Top


 

Examples

 CHGOBJD   OBJ(LIB1/DA1)  OBJTYPE(*DTAARA)
          TEXT('NEW TEXT FOR DA1')

This command changes the text description of the data area named DA1 located in the library LIB1 to the value specified by the TEXT parameter.

Top


 

Error messages

*ESCAPE Messages

CPF2105

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

CPF2110

Library &1 not found.

CPF2113

Cannot allocate library &1.

CPF2114

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

CPF2123

No objects of specified name or type exist in library &2.

CPF2150

Object information function failed.

CPF2151

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

CPF2176

Library &1 damaged.

CPF2182

Not authorized to library &1.

CPF2189

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

CPF2195

Text value must be *SAME.

CPF2196

Library value cannot be a special value.

CPF2198

Days used count field not reset to 0 for some objects.

CPF2451

Message queue &1 is allocated to another job.

CPF36F7

Message queue QSYSOPR is allocated to another job.

CPF7304

File &1 in &2 not changed.

Top