CHGOBJD (Change Object Description)

CHGOBJD Command syntax diagram

 

Purpose

The Change Object Description (CHGOBJD) command changes the text description of an object and resets the days used count for the object to zero.

 

Restrictions

  1. For file objects, users of this command must have object operational and object management authority to the object being changed and execute authority to the library where the object is located.
  2. For non-file objects, users of this command must have object management authority to the object being changed and execute authority to the library where the object is located.

 

Required Parameters

OBJ
Specifies the qualified name of the object whose text description is being changed. If no library name is given, *LIBL is used to find the specified object. The library name is entered to ensure that the correct object is being specified.

Note: Users changing the object description for objects of type *DEVD 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 the user is already signed on the display device for which the description is being changed.

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

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

*USRLIBL: Only the libraries in the user portion of the job's library list are searched.

*ALL: All libraries in the system, including QSYS, are searched.

*ALLUSR Libraries

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

*ALL: All objects in the specified library (the library qualifier for this parameter) of the type specified on the OBJTYPE parameter are changed.

object-name: Specify the name of the object that is changed.

generic*-object-name: Specify the generic name of the object. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. If the complete object name is specified, and multiple libraries are searched, multiple objects can be changed only if *ALL or *ALLUSR library values can be specified for the name. See generic names for additional information.

OBJTYPE
Specifies the object type of the object that is being changed. More information is in Commonly used parameters.

*ALL: All objects in the specified library (the library qualifier for the OBJ parameter) are to be changed.

object-type: Specify the name of the object type to be changed.

 

Optional Parameters

TEXT
Specifies the text that briefly describes the object and its function. More information is in Commonly used parameters.

Note: If no changes are specified on either the TEXT or USECOUNT parameters, message CPC2105 is sent, which indicates that the object was not changed.

*SAME: The value does not change.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

USECOUNT
Specifies whether the days-used count for the object is reset.

Note: If no changes are specified on either the TEXT or USECOUNT parameters, message CPC2105 is sent, which indicates that the object was not changed.

*NORESET: The days-used count for the object is not reset.

*RESET: The days used count for the object is reset to zero. The reset date is updated to the current system date.

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

Example for CHGOBJD

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.

Error messages for CHGOBJD

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