Help Replication and Event Publishing

asnqexrp: Using the exception-reporting tool (z/OS)

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.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-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-'   

Parameters

apply_server
Specifies the name of the subsystem where a Q Apply program runs and where its control tables are stored.
apply_schema
Specifies one Q Apply program and its control tables. The default schema is ASN.
capture_server
Specifies the name of the database where a Q Capture program runs and where its control tables are stored. For z/OS, this is a location name. If you omit this parameter, two things occur:
  • The exception-reporting tool does not try to connect to the source database. You must use the exception_report_start parameter to provide a start time for the report.
  • The report uses only data that is available at the target subsystem.
capture_schema
Specifies one Q Capture program and its control tables. The default schema is ASN.
exception_report_start
Specifies the start time of the exception report. If this parameter is omitted, the generated report is specific to outage scenarios, where the exception might occur while delivering stranded transactions from the Q Capture program at the failed site to the Q Apply program at the failover site. The default value is the most recent start time of the Q Capture program. The exception_report_start parameter must be provided if capture_server is not supplied.
exception_report_end
Specifies the end time of the exception report. If this parameter is omitted, the generated report is specific to outage scenarios, where the exception might occur while delivering stranded transactions from the Q Capture program at the failed site to the Q Apply program at the failover site. The default value is the timestamp when all stranded changes have been delivered and processed at the failover site.

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

Where Y is years, M is months, D is days, H is hours, M is minutes, S is seconds, and s is milliseconds.

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.

Sample JCL using input file

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 

Sample JCL without input file

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

Command-line example with Q Capture server and no report time specified

To generate a report about exceptions that occurred during the resending of stranded transactions from the QCAP1 database to the QAPP1 database:
asnqexrp apply_server=QAPP1 apply_schema="dpt2" capture_server=QCAP1 capture_schema="dpt1"

Command-line with Q Capture server and report start and end specified

To generate a report about exceptions that occurred between 11 p.m. and midnight on Oct. 10, 2011:
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

Command-line with no Q Capture server and report start and end specified

To generate a report about exceptions in which the exception-reporting tool does not connect to the Q Capture server (the capture_server and capture_schema parameters are omitted, and because of this exception_report_start and exception_report_end are specified as required). The exception-reporting window that is specified is between 10 a.m. and 1 p.m. on Nov. 14, 2011.
asnqexrp apply_server=QAPP1 apply_schema="dpt2" exception_report_start=2011-11-14-10 exception_report_end=2011-11-14-13


Send your feedback | Information roadmap | The Q+SQL Replication Forum

Update icon Last updated: 2013-10-25