Use the asnqexrp command to generate a report about exceptions that occurred while applying transactions to the target database.
Besides providing an exception report for general usage, this tool can be used specifically for Active/Active and Active/Standby configurations by automatically identifying the exceptions that might occur when transactions that were stranded at a failed site are delivered to the failover site during a fallback procedure.
The asnqexrp command should be run locally to the failover site on z/OS. Connection to the source database, where the Q Capture control tables are stored, is optional.
You can specify a data set to receive the report contents. If no data set is specified, the report goes to stdout. For example, the following JCL specifies a data set named EXCPRPT:
//EXCPRPT DD DSN=HLQ. EXCPRPT,DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(5,1))
Make sure to specify a logical record length (LRECL) value that is large enough to hold the report contents, for example, 500.
>>-asnqexrp--apply_server=subsystem_name--+--------------------------+--> '-apply_schema=schema_name-' >--+------------------------------+--+----------------------------+--> '-capture_server=location_name-' '-capture_schema=schema_name-' >--+----------------------------------+--+--------------------------------+->< '-exception_report_start=timestamp-' '-exception_report_end=timestamp-'
Timestamps for the exception_report_start and exception_report_end parameters must be in one of the following formats:
YYYY-MM-DD-HH.MM.SS.ssssss
YYYY-MM-DD-HH.MM.SS
YYYY-MM-DD-HH.MM
YYYY-MM-DD-HH
YYYY-MM-DD
The timestamps for both exception_report_start and exception_report_end in the exception report are provided in the time zone of the Q Apply server.
The following job control lanugage (JCL) example invokes the asnqexrp command and specifies that the command parameters be read from a data set:
/ASNQEXRP EXEC PGM=ASNQEXRP,REGION=0M,
// PARM=''
//STEPLIB DD DSN=DPROPR.USER.LIXIAO.SASNLOAD,DISP=SHR,
// UNIT=SYSDA,VOL=SER=DRRSH1
// DD DISP=SHR,DSN=CEEA.SCEERUN
// DD DISP=SHR,DSN=DB2A.SDSNLOAD
//MSGS DD PATH='/opt/usr/lpp/db2repl_08_02/msg/En_US/db2asn.cat'
//CEEDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//EXCPRPT DD DSN=OEUSR01.REPORT,
// DISP=(MOD,CATLG,KEEP),
// SPACE=(TRK,(5,1),RLSE),
// UNIT=SYSDA
//SYSIN DD DSN=SYSADM.JCL(R154RPT),DISP=SHR,
// VOL=SER=USER01,UNIT=SYSDA
The sample input data set SYSADM.JCL(R154RPT) is shown below:
APPLY_SERVER=VA1A
APPLY_SCHEMA=ASN
CAPTURE_SERVER=STLEC1
CAPTURE_SCHEMA=ASN
EXCEPTION_REPORT_START=2011-09-22-11.28.29.000000
EXCEPTION_REPORT_END=2011-09-22-15.50.29.000000
The following sample JCL invokes asnqexrp without an input data set:
//ASNQEXRP JOB ,MSGLEVEL=(1,1),MSGCLASS=H,TIME=1,REGION=4M,
// NOTIFY=&SYSUID//ASNQEXRP EXEC PGM=ASNQEXRP,PARM='/APPLY_SERVER=DB8A'
//STEPLIB DD DSN=DPROPR.USER.LIXIAO.SASNLOAD,DISP=SHR
// DD DISP=SHR,DSN=DSN.DQRG.SDSNLOAD
//MSGS DD PATH='/u/BISVT/db2asn.cat'
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSIN DD * APPLY_SCHEMA=HSYS EXCEPTION_REPORT_START=2011-08-04
asnqexrp apply_server=QAPP1 apply_schema="dpt2" capture_server=QCAP1 capture_schema="dpt1"
asnqexrp apply_server=QAPP1 apply_schema="dpt2" capture_server=QCAP1 capture_schema="dpt1"
exception_report_start=2011-10-10-23 exception_report_end=2011-10-10-24
asnqexrp apply_server=QAPP1 apply_schema="dpt2" exception_report_start=2011-11-14-10 exception_report_end=2011-11-14-13