How to run Audit Reports with a 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 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 he audit records.
//IDB2RWJ EXEC PGM=NSIGHTRW,REGION=4096K
//STEPLIB DD DISP=SHR,DSN=R200.CDBALOAD
//SYSPARMS DD DISP=SHR,DSN=R200.SOURCE(IDRWPRMS)
//DBGIN DD DISP=SHR,DSN=R200.CDBATREQ(AUDCLASx)
//HISTSTAT DD DISP=SHR,DSN=R200.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.