White Papers
Abstract
Tracking changes to object auditing values is a critical component of maintaining security and compliance on IBM i systems. This approach leverages the SYSTOOLS.AUDIT_JOURNAL_AD table function to capture and analyze audit journal entries of type AD (Auditing Change), which are generated whenever an object’s auditing settings are modified. By utilizing this function, administrators can effectively monitor changes across both traditional library objects and Integrated File System (IFS) objects.
Content
This guide demonstrates how to track changes to object auditing values on IBM i systems using the The To query the audit journal, you need: Before using Required Settings: If auditing is not configured: This query tracks changes to auditing values for objects in libraries: Interpretation: This query tracks changes to auditing values for objects in the Integrated File System: Interpretation: Key Considerations for IFS Objects: Case Sensitivity: IFS paths are case-sensitive. Use appropriate filters: Path Filtering: Target specific IFS directories: For large audit journals: The By implementing these queries and best practices, you can maintain robust security monitoring and ensure compliance with audit requirements on your IBM i systems.Tracking Auditing Value Changes on IBM i Objects
Overview
SYSTOOLS.AUDIT_JOURNAL_AD table function. This function allows you to monitor when auditing settings are modified for both library objects and IFS (Integrated File System) objects.What is AUDIT_JOURNAL_AD?
SYSTOOLS.AUDIT_JOURNAL_AD table function retrieves audit journal entries of type AD (Auditing Change), which are created whenever the auditing value of an object is changed. This is critical for:Prerequisites
System Requirements
QAUDJRN (security audit journal) must existRequired Authority
QAUDJRN) and all requested journal receivers
Security Audit Configuration
Verify Audit Settings
AUDIT_JOURNAL_AD, ensure auditing is properly configured:DSPSECAUDSecurity journal QAUDJRN exists . . . . . : YES
Current QAUDCTL system value . . . . . . : *AUDLVL
Current QAUDLVL system value . . . . . . : *SECURITY
Enable Auditing (If Needed)
CHGSECAUD QAUDCTL(*AUDLVL) QAUDLVL(*SECURITY)
Tracking Library Object Auditing Changes
SQL Query for Library Objects
SELECT ENTRY_TIMESTAMP,
QUALIFIED_JOB_NAME,
JOB_USER,
JOB_NUMBER,
USER_NAME,
OBJECT_NAME,
LIBRARY_NAME,
OBJECT_TYPE,
PREV_OBJECT_AUDIT,
OBJECT_AUDIT,
CASE
WHEN PREV_OBJECT_AUDIT = '*NONE' AND OBJECT_AUDIT <> '*NONE'
THEN 'Auditing Enabled'
WHEN PREV_OBJECT_AUDIT <> '*NONE' AND OBJECT_AUDIT = '*NONE'
THEN 'Auditing Disabled'
ELSE 'Auditing Modified'
END AS CHANGE_TYPE
FROM TABLE(
SYSTOOLS.AUDIT_JOURNAL_AD(
STARTING_TIMESTAMP => CURRENT_TIMESTAMP - 30 DAYS,
ENDING_TIMESTAMP => CURRENT_TIMESTAMP
)
) AS AD
WHERE LIBRARY_NAME IS NOT NULL -- Library objects only
AND OBJECT_NAME LIKE '%' -- All objects (modify as needed)
ORDER BY ENTRY_TIMESTAMP DESC;
NOTES:
Sample Results
ENTRY_TIMESTAMP QUALIFIED_JOB_NAME JOB_USER OBJECT_NAME LIBRARY_NAME OBJECT_TYPE PREV_OBJECT_AUDIT OBJECT_AUDIT CHANGE_TYPE 2024-01-15 14:30:22 123456/SECADMIN/QPADEV0001 SECADMIN PAYROLL PRODLIB *FILE *NONE *CHANGE Auditing Enabled 2024-01-15 10:15:45 234567/DEVELOPER/QZDASOINIT DEVELOPER TESTPGM DEVLIB *PGM *CHANGE *NONE Auditing Disabled 2024-01-14 16:45:33 345678/ADMIN/QPADEV0002 ADMIN CUSTFILE APPLIB *FILE *CHANGE *ALL Auditing Modified 2024-01-14 09:20:11 456789/JSMITH/QZSHSH JSMITH SECPGM QGPL *PGM *NONE *ALL Auditing Enabled
Understanding the Query
Column Description ENTRY_TIMESTAMPWhen the auditing value was changed QUALIFIED_JOB_NAMEQualified job name that made the change JOB_USERUser profile that ran the job OBJECT_NAMEName of the object whose auditing was changed LIBRARY_NAMELibrary containing the object OBJECT_TYPEType of object (e.g., *FILE, *PGM, *DTAARA)PREV_OBJECT_AUDITPrevious auditing value OBJECT_AUDITNew auditing value CHANGE_TYPECategorization of the change (Enabled/Disabled/Modified)
Common Auditing Values
Value Description *NONENo auditing *USRPRFAudit according to user profile settings *CHANGEAudit change operations *ALLAudit all operations
Tracking IFS Object Auditing Changes
SQL Query for IFS Objects
SELECT ENTRY_TIMESTAMP,
QUALIFIED_JOB_NAME,
JOB_USER,
JOB_NUMBER,
USER_NAME,
PATH_NAME,
PREV_OBJECT_AUDIT,
OBJECT_AUDIT,
CASE
WHEN PREV_OBJECT_AUDIT = '*NONE' AND OBJECT_AUDIT <> '*NONE'
THEN 'Auditing Enabled'
WHEN PREV_OBJECT_AUDIT <> '*NONE' AND OBJECT_AUDIT = '*NONE'
THEN 'Auditing Disabled'
ELSE 'Auditing Modified'
END AS CHANGE_TYPE,
CASE
WHEN PATH_NAME LIKE '/home/%' THEN 'User Home Directory'
WHEN PATH_NAME LIKE '/tmp/%' THEN 'Temporary Files'
WHEN PATH_NAME LIKE '/QSYS.LIB/%' THEN 'QSYS Library'
WHEN PATH_NAME LIKE '/QOpenSys/%' THEN 'Open Source'
ELSE 'Other IFS'
END AS IFS_LOCATION
FROM TABLE(
SYSTOOLS.AUDIT_JOURNAL_AD(
STARTING_TIMESTAMP => CURRENT_TIMESTAMP - 30 DAYS,
ENDING_TIMESTAMP => CURRENT_TIMESTAMP
)
) AS AD
WHERE PATH_NAME IS NOT NULL -- IFS objects only
AND (PATH_NAME LIKE '%config%' OR PATH_NAME LIKE '%Config%') -- Example filter
ORDER BY ENTRY_TIMESTAMP DESC;
NOTES:
PATH_NAME field using uppercase letters and also lower case letters . In the sample SQL, replace 'CONFIG' and 'config' with the name of the object that was deleted, moved, or renamed. Ensure the object name is inserted between the percent signs (%) when using the LIKE clause (e.g., LIKE '%CONFIG%').
Sample Results
ENTRY_TIMESTAMP QUALIFIED_JOB_NAME JOB_USER PATH_NAME PREV_OBJECT_AUDIT OBJECT_AUDIT CHANGE_TYPE IFS_LOCATION 2024-01-15 15:45:22 123456/SECADMIN/QZSHSH SECADMIN /home/apps/config/app.conf *NONE *CHANGE Auditing Enabled User Home Directory 2024-01-15 11:30:15 234567/DEVELOPER/QZSHSH DEVELOPER /QOpenSys/etc/config.ini *CHANGE *NONE Auditing Disabled Open Source 2024-01-14 14:20:45 345678/ADMIN/QZSHSH ADMIN /tmp/config_backup.txt *NONE *ALL Auditing Enabled Temporary Files 2024-01-14 08:15:33 456789/JSMITH/QZSHSH JSMITH /home/production/Config.xml *CHANGE *ALL Auditing Modified User Home Directory
Understanding the Query
Column Description ENTRY_TIMESTAMPWhen the auditing value was changed QUALIFIED_JOB_NAMEQualified job name that made the change JOB_USERUser profile that ran the job PATH_NAMEFull IFS path of the object whose auditing was changed PREV_OBJECT_AUDITPrevious auditing value OBJECT_AUDITNew auditing value CHANGE_TYPECategorization of the change (Enabled/Disabled/Modified) IFS_LOCATIONCategorized location within the IFS (User Home Directory, Temporary Files, QSYS Library, Open Source, Other IFS)
IFS Query Differences
WHERE (PATH_NAME LIKE '%config%' OR PATH_NAME LIKE '%Config%')WHERE PATH_NAME LIKE '/home/production/%'
OR PATH_NAME LIKE '/QOpenSys/var/%'IFS_LOCATION column helps identify which part of the IFS was affected
Best Practices
1. Regular Monitoring
2. Filtering Strategies
-- Focus on recent changes
WHERE ENTRY_TIMESTAMP > CURRENT_TIMESTAMP - 7 DAYS
-- Monitor specific libraries
WHERE LIBRARY_NAME IN ('PRODLIB', 'SECLIB')
-- Track auditing being disabled
WHERE OBJECT_AUDIT = '*NONE'
-- Monitor IFS security directories
WHERE PATH_NAME LIKE '/home/production/%'3. Security Considerations
4. Performance Optimization
-- Use specific time ranges
STARTING_TIMESTAMP => '2024-01-01 00:00:00',
ENDING_TIMESTAMP => '2024-01-31 23:59:59'
-- Limit result sets
FETCH FIRST 1000 ROWS ONLY
-- Add appropriate indexes on filtered columns
Additional Resources
Summary
SYSTOOLS.AUDIT_JOURNAL_AD table function provides powerful capabilities for tracking auditing value changes on IBM i systems:
Was this topic helpful?
Document Information
Modified date:
03 June 2026
UID
ibm17274875