CHGOBJAUD (Change Object Auditing)
CHGOBJAUD Command syntax diagram
Purpose
The Change Object Auditing (CHGOBJAUD) command allows users with *AUDIT special authority to set up or change auditing on an object. Users with *AUDIT special authority can turn auditing on or off for an object regardless of whether they have authority to the object. The system value QAUDCTL controls turning auditing on and off. The auditing attribute of an object can be displayed with the Display Object Description (DSPOBJD) command.
Required Parameters
- OBJ
- Specifies the name of the object for which auditing values are 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 auxiliary storage pools (ASPs) specified by the ASPDEV parameter are searched.>
*ALLUSR: All user libraries in the ASPs specified by the ASPDEV parameter are searched. >All libraries with names that do not begin with the letter Q are searched except for the following:
#CGULIB
#COBLIB
#DFULIB
#DSULIB#RPGLIB
#SDALIB
#SEULIB
Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are also considered user libraries and are also searched:
QDSNX
QGPL
QGPL38
QMPGDATA
QMQMDATA
QMQMPROC
QPFRDATA
QRCL
QRCLnnnnn
QS36F
QUSER38
QUSRADSM
QUSRBRM
QUSRDIRCL
QUSRDIRDB
QUSRIJS
QUSRINFSKR
QUSRNOTESQUSROND
QUSRPOSGS
QUSRPOSSA
QUSRPYMSVR
QUSRRDARS
QUSRSYS
QUSRVI
QUSRVxRxMx
Notes:
"nnnnn" is the number of a primary auxiliary storage pool.
- A different library name, of the form QUSRVxRxMx, can be created by the user for each release that IBM supports. VxRxMx is the version, release, and modification level of the library.
*ALLAVL: All libraries in all available ASPs are searched.
*ALLUSRAVL: All user libraries in all available ASPs are searched. Refer to *ALLUSR for a definition of user libraries.>
library-name: Specify the name of the library to be searched.
*ALL: All objects that have the specified object type are changed.
object-name: Specify the name of the object for which auditing values are 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, *ALLUSR, *ALLAVL, or *ALLUSRAVL> library values can be specified for the name. For more information on the use of generic names, refer to generic names.
- OBJTYPE
- Specifies the type of the object being changed. More information on this parameter is in Commonly used parameters.
*ALL: All object types that have the specified object name are changed.
object-type: Specify the type of the object for which auditing values are changed.
- OBJAUD
- Specifies the object auditing value for this object.
*NONE: Using or changing this object will not cause an audit entry to be sent to the security journal.
*USRPRF: The user profile of the user accessing this object is used to determine if an audit record will be sent for this access. The OBJAUD keyword of the CHGUSRAUD command is used to turn on auditing for a specific user.
*CHANGE: All change accesses to this object by all users are logged.
*ALL: All change or read accesses to this object by all users are logged.
Optional Parameters
- ASPDEV
- Specifies the auxiliary storage pool (ASP) device name where the library that contains the object (OBJ parameter) is located. If the object's library resides in an ASP that is not part of the library name space associated with the job, this parameter must be specified to ensure the correct object is used as the target of the change object auditing operation.
*: The ASPs that are currently part of the job's library name space will be searched to locate the object. This includes the system ASP (ASP number 1), all defined basic user ASPs (ASP numbers 2-32), and, if the job has an ASP group, all independent ASPs in the ASP group.
*SYSBAS: The system ASP and all basic user ASPs will be searched to locate the object. No independent ASPs will be searched, even if the job has an ASP group.
auxiliary-storage-pool-device-name: The device name of the independent ASP to be searched to locate the object. The independent ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The system ASP and basic user ASPs will not be searched.>
Example for CHGOBJAUD
CHGOBJAUD OBJ(PAYROLL/PAYFILE) OBJTYPE(*FILE) OBJAUD(*CHANGE)This command changes the object auditing value of the PAYFILE object in the PAYROLL library that has an object type *FILE. The auditing value of the PAYFILE file is changed so that changes to the file by any user is logged to the auditing journal QAUDJRN in QSYS.
Error messages for CHGOBJAUD
*ESCAPE Messages
- CPF22B0
- Not authorized to change the auditing value.
- CPF22CB
- Auditing value not changed for some objects.
- CPF22FE
- Audit value may not have been changed for object &1 in &3 type *&2.
- CPF2208
- Object &1 in library &3 type *&2 not found
- CPF98A1
- Cannot find object to match specified name.
- CPF980B
- Object &1 in library &2 not available.
- CPF9801
- Object &2 in library &3 not found.
- CPF9803
- Cannot allocate object &2 in library &3.
- CPF9810
- Library &1 not found.
- CPF9814
- Device &1 not found.
- CPF9873
- ASP status is preventing access to object.>