Start of change

AUDIT_JOURNAL_GR table function

The AUDIT_JOURNAL_GR table function returns rows from the audit journal that contain information from the GR (Generic Record) 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_GR 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 GR audit journal entry.
ENTRY_TYPE CHAR(1) The type of entry.
A
Exit program added
D
Exit program removed
F
Function registration operations
O
ObjectConnect operations
R
Exit program replaced
ENTRY_TYPE_DETAIL VARCHAR(200) Descriptive text that corresponds to the entry type.
ACTION CHAR(2) The action performed.
ZC
Change
ZR
Read
When ENTRY_TYPE is O:
SV
Save
RS
Restore
ACTION_DETAIL VARCHAR(200) Descriptive text that describes the action.
EXIT_POINT_NAME VARCHAR(20) When ENTRY_TYPE is A, D, or R, the exit point name.

Contains the null value when ENTRY_TYPE is F, or O.

EXIT_POINT_FORMAT CHAR(8) When ENTRY_TYPE is A, D, or R, the exit point format name associated with the exit point

Contains the null value when ENTRY_TYPE is F, or O.

EXIT_PROGRAM_NUMBER INTEGER When ENTRY_TYPE is A, D, or R, the exit program number associated with the exit program.

Contains the null value when ENTRY_TYPE is F, or O.

EXIT_PROGRAM_LIBRARY VARCHAR(10) When ENTRY_TYPE is A, D, or R, the library in which EXIT_PROGRAM resides.

Contains the null value when ENTRY_TYPE is F, or O.

EXIT_PROGRAM VARCHAR(10) When ENTRY_TYPE is A, D, or R, the name of the exit program..

Contains the null value when ENTRY_TYPE is F, or O.

USER_PROFILE_NAME VARCHAR(10) User profile name

When ENTRY_TYPE is F, contains the name of the user the function registration operation was performed against. When a REGISTER or REREGISTER operation is being performed that includes the default usage, contains *DEFAULT.

When ENTRY_TYPE is O, contains the name of the user performing the ObjectConnect operation.

Contains the null value when ENTRY_TYPE is A, D, or R, or if a user profile name does not apply to the entry.

FUNCTION _REGISTRATION_
OPERATION
VARCHAR(13) When ENTRY_TYPE is F, contains the description of the function registration operation that was performed. The possible values are:
CHANGE USAGE
Function usage information has been changed, such as which user profiles are allowed to use a function.
CHECK USAGE
Function usage information was checked for a user and determined the user is allowed to use the specified function.
DEREGISTER
Function and all associated usage information has been removed from the registration facility.
REGISTER
Function has been registered with the registration facility.
REREGISTER
Function has been updated and replaced within the registration facility.
USAGE FAILURE
Function usage information was checked for a user and determined the user is not allowed to use the specified function.

Contains the null value when ENTRY_TYPE is not F.

FUNCTION_NAME VARCHAR(30) When ENTRY_TYPE is F, contains the name of the function that was operated on.

Contains the null value when ENTRY_TYPE is not F.

USAGE_SETTING VARCHAR(7) When ENTRY_TYPE is F, contains the usage value for the user specified in USER_PROFILE_NAME. If USER_PROFILE_NAME is *DEFAULT, this is the default usage.
ALLOWED
The user is allowed to use the function.
DENIED
The user is not allowed to use the function.
REMOVED
The user's previous setting is removed.
UNKNOWN
The user did not previously have a usage value.

Contains the null value when ENTRY_TYPE is not F or if no value is available.

PREVIOUS_USAGE VARCHAR(7) When ENTRY_TYPE is F, contains the previous usage value for a user. If USER_PROFILE_NAME is *DEFAULT, this is the previous default usage.
ALLOWED
The user is allowed to use the function.
DENIED
The user is not allowed to use the function.
REMOVED
The user's previous setting is removed.
UNKNOWN
The user did not previously have a usage value.

Contains the null value when ENTRY_TYPE is not F or if no value is available.

FUNCTION_ALLOBJ VARCHAR(8) When ENTRY_TYPE is F and FUNCTION _REGISTRATION_OPERATION is REGISTER or REREGISTER, contains the setting that indicates whether all object (*ALLOBJ) special authority may be used to give a user access to the function.
NOT USED
For a user with *ALLOBJ special authority to use the function, the usage information specified for the function must indicate that the user is allowed to use the function
USED
A user with *ALLOBJ special authority is always allowed to use the function.

Contains the null value when ENTRY_TYPE is not F or if no value is available.

PREVIOUS_ALLOBJ VARCHAR(8) When ENTRY_TYPE is F and FUNCTION _REGISTRATION_OPERATION is REREGISTER, contains the previous setting that indicates whether all object (*ALLOBJ) special authority may be used to give a user access to the function.
NOT USED
For a user with *ALLOBJ special authority to use the function, the usage information specified for the function must indicate that the user is allowed to use the function
USED
A user with *ALLOBJ special authority is always allowed to use the function.

Contains the null value when ENTRY_TYPE is not F or if no value is available.

OBJECTCONNECT_COMMAND VARCHAR(9) When ENTRY_TYPE is O, contains the ObjectConnect CL command.
SAVRST
Save/Restore Integrated File System Object
SAVRSTCFG
Save/Restore Configuration
SAVRSTCHG
Save/Restore Changed Object
SAVRSTDLO
Save/Restore Document Library Object
SAVRSTLIB
Save/Restore Library
SAVRSTOBJ
Save/Restore Object

Contains the null value when ENTRY_TYPE is not O.

SAVE_SYSTEM VARCHAR(15) When ENTRY_TYPE is O and ACTION is RS, contains the name of the system on which the objects are saved.

When ENTRY_TYPE is O and ACTION is SV, contains the name of the system on which the objects are restored.

If ObjectConnect uses *DB2MIRROR for the connection type, the NRG name is returned.

Contains the null value when ENTRY_TYPE is not O.

SAVE_ASP VARCHAR(10) When ENTRY_TYPE is O and OBJECTCONNECT_COMMAND is SAVRST, SAVRSTCHG, SAVRSTLIB, or SAVRSTOBJ, the ASP device name. Can contain one of the following special values:
  • *
  • *ALLAVL
  • *ANY
  • *CURASPGRP
  • *SYSBAS
  • 1-32

Contains the null value when ENTRY_TYPE is not O or there is no ASP device.

SAVE_LIBRARY VARCHAR(10) When ENTRY_TYPE is O and OBJECTCONNECT_COMMAND is SAVRST, SAVRSTCHG, SAVRSTLIB, or SAVRSTOBJ, the library name is set when processing objects from the QSYS file system. It is the name of the saved library or the library from which the objects were saved.

Contains the null value when ENTRY_TYPE is not O or there is no saved library.

RESTORE_ASP_DEVICE VARCHAR(10) When ENTRY_TYPE is O and OBJECTCONNECT_COMMAND is SAVRST, SAVRSTCHG, SAVRSTLIB, or SAVRSTOBJ, the ASP device name. Can contain the following special value:
  • *SAVASPDEV

Contains the null value when ENTRY_TYPE is not O or RESTORE_ASP_NUMBER is set.

RESTORE_ASP_NUMBER VARCHAR(10) When ENTRY_TYPE is O and OBJECTCONNECT_COMMAND is SAVRST, SAVRSTCHG, SAVRSTLIB, or SAVRSTOBJ, the ASP number, 1-32. Can contain the following special value:
  • *SAVASP

Contains the null value when ENTRY_TYPE is not O or RESTORE_ASP_DEVICE is set.

RESTORE_LIBRARY VARCHAR(10) When ENTRY_TYPE is O and OBJECTCONNECT_COMMAND is SAVRST, SAVRSTCHG, SAVRSTLIB, or SAVRSTOBJ, the library name is set when processing objects from the QSYS file system otherwise it is blank. It is the name of the restored library or the library to which the objects were restored.

Contains the null value when ENTRY_TYPE is not O or there is no restore library name.

OBJECTCONNECT_UUID VARCHAR(16) When ENTRY_TYPE is O, contains the Universal Unique Identifier (UUID) of the ObjectConnect operation.

Contains the null value when ENTRY_TYPE is not O.

RESTORE_USER VARCHAR(10) When ENTRY_TYPE is O and ACTION is SV, contains the name of the user under which the restore will be performed. Can contain the following special values:
*CURRENT
*KERBEROS
*NONE

Contains the null value when ENTRY_TYPE is not O with an ACTION of SV.

Example

  • List any changes to function usage definitions from the last two weeks
    SELECT *
      FROM TABLE (
          SYSTOOLS.AUDIT_JOURNAL_GR (STARTING_TIMESTAMP => CURRENT DATE - 14 DAYS))
        )
      WHERE ENTRY_TYPE = 'F' AND
            FUNCTION_REGISTRATION_OPERATION = 'CHANGE USAGE';
      
End of change