Package Audit Report CSV Extract
Package audit (program CMNAD500) can, optionally, output a CSV record for each audit error reported. These CSV records can be downloaded to a PC and opened using Excel, or loaded into a DB2 table, or processed in any way you see fit.
The format of the CSV record is most easily described using the sample DDL supplied for creating a DB2 table to take these values (see below).
Sample JCL member CMNDB2CS supplies the JCL/DDL required to both create this table and to load it from the CSV file.
If you want to make use of this facility, you need only allocate the following ddname to the CMNAD500 step in your audit job:
//*
//AD500 EXEC PGM=CMNAD500, *** FORMAT AUDIT REPORT
// PARM='SUBSYS=8,USER=WSER58,SUP=NO'
//*)IM CMN$$SPR
//SER#PARM DD DISP=SHR,DSN=…
//SYSPRINT DD SYSOUT=*
//ABNLIGNR DD DUMMY
//SYSUDUMP DD SYSOUT=*
//AUDIT10 DD DISP=(OLD,DELETE),DSN=&&SORT10
//AUDIT20 DD DISP=(OLD,DELETE),DSN=&&SORT20
//AUDIT30 DD DISP=(OLD,DELETE),DSN=&&SORT30
//AUDITRPT DD SYSOUT=*
//CMNCSV01 DD DISP=OLD,DSN=your.audit.csv.file
...
This sequential file should be allocated as RECFM=VB,LRECL=700,BLKSIZE=0
The variables in each record of the file are described as follows:
TARGET_PKG CHAR(10) NOT NULL WITH DEFAULT,
TOP_XAPPL CHAR(4) NOT NULL WITH DEFAULT,
TOP_NAME VARCHAR(256) NOT NULL WITH DEFAULT,
TOP_LIBTYPE CHAR(3) NOT NULL WITH DEFAULT,
TOP_BASE_SETSSI CHAR(8) NOT NULL WITH DEFAULT,
TOP_BASE_TIME TIMESTAMP NOT NULL WITH DEFAULT '1900-01-01-00.00.00',
TOP_BASE_USERID CHAR(8) NOT NULL WITH DEFAULT,
TOP_STAGE_PKG CHAR(10) NOT NULL WITH DEFAULT,
TOP_STAGE_SETSSI CHAR(8) NOT NULL WITH DEFAULT,
TOP_STAGE_TIME TIMESTAMP NOT NULL WITH DEFAULT '1900-01-01-00.00.00',
TOP_STAGE_USERID CHAR(8) NOT NULL WITH DEFAULT,
SYNCH_ERROR CHAR(2) NOT NULL WITH DEFAULT,
BOTTOM_NAME VARCHAR(256) NOT NULL WITH DEFAULT,
BOTTOM_PKG CHAR(10) NOT NULL WITH DEFAULT,
BOTTOM_SETSSI CHAR(8) NOT NULL WITH DEFAULT,
BOTTOM_TIME TIMESTAMP NOT NULL WITH DEFAULT '1900-01-01-00.00.00',
BOTTOM_USERID CHAR(8) NOT NULL WITH DEFAULT
...
Each error is reported in a single summary line:
-
For non-relational errors (i.e. not copybook or subroutine errors) only the 'TOP' fields are used.
-
BASE fields contain the values for the baseline version of the component, STAGE from the staging version.
-
If a value doesn't exist (e.g. not in baseline), the field is represented by an adjacent comma.
-
Non-load module info has no SETSSI value.
-
Load module info has the SETSSI value and the provided timestamp is derived directly from that setssi value.
-
Relational errors (synch4 etc.) make use of the TOP BASE and STAGE fields to describe the affected top level component and the BOTTOM fields to describe the subcomponent causing the error.