Start of change

AUDIT_JOURNAL_AD (Auditing Change) table function

The AUDIT_JOURNAL_AD table function returns rows from the audit journal that contain information from the AD (Auditing Change) journal entries.

Every audit journal table function shares a common authorization requirement and a common set of parameters. These are described in AUDIT JOURNAL table function common information.

The result of the function is a table containing rows with the format shown in the following table. All the columns are nullable.

Table 1. AUDIT_JOURNAL_AD table function
Column Name Data Type Description
The first columns returned by this table function are from the common audit journal entry header. See Common columns returned from the audit journal entry header for the column definitions. After the common columns are the following columns that describe the entry specific data for the AD audit journal entry.
ENTRY_TYPE CHAR(1) The type of entry.
D
CHGDLOAUD command
O
CHGOBJAUD or CHGAUD command
S
The scan attribute was changed using CHGATR command or the Qp0lSetAttr API, or when the object was created.
U
CHGUSRAUD command
ENTRY_TYPE_DETAIL VARCHAR(200) Descriptive text that corresponds to the entry type.
OBJECT_AUDIT VARCHAR(10) The current object audit value.

Contains the null value if ENTRY_TYPE is S.

PREV_OBJECT_AUDIT VARCHAR(10) The previous object audit value.

Contains the null value if ENTRY_TYPE is S.

SCAN_ATTRIBUTE VARCHAR(10) The scan attribute value.

Contains the null value if ENTRY_TYPE is not S .

LIBRARY_NAME VARCHAR(10) Name of the library for the object.

Contains the null value if there is no library name.

OBJECT_NAME VARCHAR(10) Name of the object for which auditing was changed.

Contains the null value if there is no object name.

OBJECT_TYPE VARCHAR(7) The type of object.

Contains the null value if there is no object type.

OBJECT_ASP_NAME VARCHAR(10) The name of the auxiliary storage pool (ASP) in which the object resides. A value of *SYSBAS indicates the system ASP and all basic user ASPs.

Contains the null value if there is no ASP information.

OBJECT_ASP_NUMBER INTEGER The number of the ASP device. 1 indicates the system ASP.

Contains the null value if there is no ASP information.

PATH_NAME VARGRAPHIC(5000) CCSID 1200 The path name of the object.

Contains the null value if the path name is not available or the object is not in the "root" (/), QOpenSys, or user-defined file systems.

PATH_NAME_INDICATOR VARCHAR(3) Path name indicator:
NO
The PATH_NAME column does not contain an absolute path name for the object, instead it contains a relative path name. The RELATIVE_DIRECTORY_FILE_ID can be used to form an absolute path name with this relative path name.
YES
The PATH_NAME column contains the absolute path name for the object.

Contains the null value if the object is not in the "root" (/), QOpenSys, or user-defined file systems.

RELATIVE_DIRECTORY_FILE_ID BINARY(16) When PATH_NAME_INDICATOR is NO, contains the file ID of the directory that contains the object identified in the PATH_NAME column.

Contains the null value when PATH_NAME_INDICATOR is YES, or if the file ID is not available or the object is not in the "root" (/), QOpenSys, or user-defined file systems.

IFS_OBJECT_NAME VARGRAPHIC(512) CCSID 1200 The name of the object.

Contains the null value if the object name is not available or the object is not in the "root" (/), QOpenSys, or user-defined file systems.

OBJECT_FILE_ID BINARY(16) The file ID of the object.

Contains the null value if the object is not in the "root" (/), QOpenSys, or user-defined file systems.

PARENT_FILE_ID BINARY(16) The file ID of the parent directory.

Contains the null value if the file ID is not available or the object is not in the "root" (/), QOpenSys, or user-defined file systems.

DLO_NAME VARCHAR(12) The name of the folder or document.

Contains the null value if there is no name or if ENTRY_TYPE is not D.

FOLDER_PATH VARCHAR(63) The path of the folder.

Contains the null value if there is no folder path or if ENTRY_TYPE is not D.

CHGUSRAUD_AUTFAIL VARCHAR(3) Write an audit record when this user has an authorization failure.
NO
Do not write an audit record when this user has an authorization failure.
YES
Write an audit record when this user has an authorization failure.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_CMD VARCHAR(3) Audit commands for this user.
NO
Do not audit commands for this user.
YES
Audit commands for this user.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_CREATE VARCHAR(3) Write an audit record when this user creates an object.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_DELETE VARCHAR(3) Write an audit record when this user deletes an object.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_JOBBAS VARCHAR(3) Write an audit record when this user performs a job base function.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_JOBCHGUSR VARCHAR(3) Write an audit record when this user changes a thread's active user profile or its group file.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_JOBDTA VARCHAR(3) Write an audit record when this user changes a job.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETBAS VARCHAR(3) Write an audit record when this user performs network base functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETCLU VARCHAR(3) Write an audit record when this user performs cluster or cluster resource group functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETCMN VARCHAR(3) Write an audit record when this user performs network communications functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETFAIL VARCHAR(3) Write an audit record when this user has a network failure.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETSCK VARCHAR(3) Write an audit record when this user performs sockets tasks.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETSECURE VARCHAR(3) Write an audit record when this user establishes a secure connection.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_NETUDP VARCHAR(3) Write an audit record for UDP inbound and outbound traffic for this user.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_OBJMGT VARCHAR(3) Write an audit record when this user moves or renames an object.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_OFCSRV VARCHAR(3) Write an audit record when this user performs office functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_OPTICAL VARCHAR(3) Write an audit record when this user accesses optical devices.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_PGMADP VARCHAR(3) Write an audit record when this user obtains authority through adopted authority.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_PGMFAIL VARCHAR(3) Write an audit record when this user has a program failure.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_PRTDTA VARCHAR(3) Write an audit record when this user performs a print function with parameter SPOOL(*NO).
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SAVRST VARCHAR(3) Write an audit record when this user saves or restores objects.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECCFG VARCHAR(3) Write an audit record when this user performs security configuration.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECDIRSRV VARCHAR(3) Write an audit record when this user makes changes or updates using directory service functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECIPC VARCHAR(3) Write an audit record when this user makes changes to interprocess communications.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECNAS VARCHAR(3) Write an audit record when this user performs network authentication service actions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECRUN VARCHAR(3) Write an audit record when this user performs security run time functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECSCKD VARCHAR(3) Write an audit record when this user performs socket descriptor functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECURITY VARCHAR(3) Write an audit record when this user performs security-relevant actions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECVFY VARCHAR(3) Write an audit record when this user uses verification functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SECVLDL VARCHAR(3) Write an audit record when this user manipulates validation lists.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SERVICE VARCHAR(3) Write an audit record when this user performs service functions.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SPLFDTA VARCHAR(3) Write an audit record when this user manipulates spooled files.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

CHGUSRAUD_SYSMGT VARCHAR(3) Write an audit record when this user makes systems management changes.
NO
Do not write an audit record.
YES
Write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_AUTFAIL VARCHAR(3) Previous value for write an audit record when this user has an authorization failure.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_CMD VARCHAR(3) Previous value for audit commands for this user.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_CREATE VARCHAR(3) Previous value for write an audit record when this user creates an object.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_DELETE VARCHAR(3) Previous value for write an audit record when this user deletes an object.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_JOBBAS VARCHAR(3) Previous value for write an audit record when this user performs a job base function.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_JOBCHGUSR VARCHAR(3) Previous value for write an audit record when this user changes a thread's active user profile or its group file.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_JOBDTA VARCHAR(3) Previous value for write an audit record when this user changes a job.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETBAS VARCHAR(3) Previous value for write an audit record when this user performs network base functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETCLU VARCHAR(3) Previous value for write an audit record when this user performs cluster or cluster resource group functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETCMN VARCHAR(3) Previous value for write an audit record when this user performs network communications functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETFAIL VARCHAR(3) Previous value for write an audit record when this user has a network failure.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETSCK VARCHAR(3) Previous value for write an audit record when this user performs sockets tasks
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETSECURE VARCHAR(3) Previous value for write an audit record when this user establishes a secure connection.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_NETUDP VARCHAR(3) Previous value for write an audit record for UDP inbound and outbound traffic for this user.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_OBJMGT VARCHAR(3) Previous value for write an audit record when this user moves or renames an object.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_OFCSRV VARCHAR(3) Previous value for write an audit record when this user performs office functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_OPTICAL VARCHAR(3) Previous value for write an audit record when this user accesses optical devices.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_PGMADP VARCHAR(3) Previous value for write an audit record when this user obtains authority through adopted authority.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_PGMFAIL VARCHAR(3) Previous value for write an audit record when this user has a program failure.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_PRTDTA VARCHAR(3) Previous value for write an audit record when this user performs a print function with parameter SPOOL(*NO).
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SAVRST VARCHAR(3) Previous value for write an audit record when this user saves or restores objects.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECCFG VARCHAR(3) Previous value for write an audit record when this user performs security configuration.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECDIRSRV VARCHAR(3) Previous value for write an audit record when this user makes changes or updates using directory service functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECIPC VARCHAR(3) Previous value for write an audit record when this user makes changes to interprocess communications.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECNAS VARCHAR(3) Previous value for write an audit record when this user performs network authentication service actions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECRUN VARCHAR(3) Previous value for write an audit record when this user performs security run time functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECSCKD VARCHAR(3) Previous value for write an audit record when this user performs socket descriptor functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECURITY VARCHAR(3) Previous value for write an audit record when this user performs security-relevant actions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECVFY VARCHAR(3) Previous value for write an audit record when this user uses verification functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SECVLDL VARCHAR(3) Previous value for write an audit record when this user manipulates validation lists.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SERVICE VARCHAR(3) Previous value for write an audit record when this user performs service functions.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SPLFDTA VARCHAR(3) Previous value for write an audit record when this user manipulates spooled files.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

PREV_CHGUSRAUD_SYSMGT VARCHAR(3) Previous value for write an audit record when this user makes systems management changes.
NO
Previous value was to not write an audit record.
YES
Previous value was to write an audit record.

Contains the null value if ENTRY_TYPE is not U.

Example

  • List objects in APPLIB that had auditing changes made with the CHGOBJAUD CL command yesterday and today.
    SELECT LIBRARY_NAME, OBJECT_NAME, OBJECT_TYPE , OBJECT_AUDIT
      FROM TABLE (
          SYSTOOLS.AUDIT_JOURNAL_AD (STARTING_TIMESTAMP => CURRENT DATE - 1 DAY)
        )
      WHERE ENTRY_TYPE = 'O' AND LIBRARY_NAME = 'APPLIB';
      
End of change