How to run Sysview Performance Management Option for Db2 for z/OS (IDB2) Audit Reports with Batch Report Writer JCL.
Audit Reports AUDCLASx can be started online and can be run also in batch.
To run the Audit AUDCLASx requests in Batch you need a data set with the IFCID 144 records.
If you start the IDB2 data collector with the IFCID 144 record in HIST-STATS-RECS=(...,144) parameter the audit records will be stored
in History Stats file, then you can run the following Batch Report Writer JCL to print the audit records.
//IDB2RWJ EXEC PGM=NSIGHTRW,REGION=4096K
//STEPLIB DD DISP=SHR,DSN=hlq.CDBALOAD
//SYSPARMS DD DISP=SHR,DSN=hlq.SOURCE(IDRWPRMS)
//DBGIN DD DISP=SHR,DSN=hlq.CDBATREQ(AUDCLASx)
//HISTSTAT DD DISP=SHR,DSN=hlq.ssid.HSTSTATS
//DBGPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
There should be a discrepancy for buffer to be flushed when you run the report and the last records still in buffers will not be printed,
to be sure there is not any discrepancy you have to stop the data collector and then all IFCID records will be flushed to the History Stats file.
To create this report in batch it is not necessary to start the AUDCLASx online, you only need the IFCID 144 record in HIST-STATS-RECS=(...,144) parameter.