Preparing the Log File for Unattended Playback (MQ)
When you create scripts, select the Log Entries option on the Create Script - Create Options (2 of 2) panel (WebSphere MQ Create Scripts - Create Options Screen (2 of 2)), to generate the log file used to run an unattended playback job. The log file contains a series of SET statements that call playback and reporting control assets. Most of the SET statement values default to the system-level playback and report control library and member names. Override them with your personal library information if necessary. Additionally, the values default to produce a script analysis job. Run a script analysis prior to the actual playback to ensure the script contains the appropriate activity for the testing you need to perform. Compare the contents of two different scripts, by running a script analysis on each and saving the collected data. Then generate a comparison report. See Reporting for more information on report generation.
To prepare the log for an unattended playback job:
- Verify and, if necessary, edit the values of the SET statements at the beginning of the log file. Refer to the SET statement definitions following the sample log illustration (Sample Log File).
Between ANALYZE EXEC PROC=MQPLAY1 and LOGCOPY.INDD DD * insert a DD statement for each REPORT statement in the REPORT member that is going to be written to a data set or HTML file. Do not add DD statements for reports written to SYSOUT. The MQPLAY1 procedure provides a DD statement for SYSOUT.
To generate an interactive HTML Playback Error Summary Report, add PROCESS.HTMLLOG DD with the appropriate PATHOPTS, PATH, and PATHMODE definitions.
- Review the MQGROUP and SCRIPT statements to ensure they meet your needs.
When finished preparing the log, submit the job. See Submitting the Job.
Sample Log File//jobcard
//*
/*JOBPARM SYSAFF=TEST
//UPROCS JCLLIB ORDER=('COMPWARE.SQVPPROC')
//*
//**********************************************************************
//* EXEC PROC TO PROCESS LOG/SORT/REPORT *
//**********************************************************************
//*
// SET ACTION=ANALYZE ANALYZE/PLAYBACK/other
//*
// SET CNTLDS= COMPWARE.CONTROL
// SET REPTDS= COMPWARE.REPORT
//*
// SET SCRIPT= COMPWARE.SCRIPT
// SET UNSORTED=&&UNSORTED
// SET SORTED=&&SORTED
//*
// SET COLLMEM=COLLECT
// SET REPTCNTL=MQRCTT
// SET REPTMEM=MQRCOMP
//*
//*
//ANALYZE EXEC PROC=MQPLAY1
//*
//**********************************************************************
//* *
//* TO ADD ADDITIONAL REPORT OUTPUT DATASETS, USE THE FOLLOWING *
//* HFS OR MVS DATASET MODEL CHANGING THE ddname TO THE NAME *
//* SPECIFIED ON THE REPORT INTO() STATEMENT *
//* *
//* //REPORT.ddname DD PATHMODE=(SIRWXU,SIRGRP,SIROTH), *
//* // PATHOPTS=(ORDWR,OCREAT), *
//* // PATH='/hfs/path/reptname.htm' *
//* *
//* or *
//* *
//* //REPORT.ddname DD DISP=SHR,DSN=sysout.dataset.name *
//* *
//**********************************************************************
//*
//LOGCOPY.INDD DD *
************************************************************************
* *
* HIPERSTATION FOR WEBSPHERE MQ LOG STARTED ON 2006/07/10 AT 12:12:01 *
* *
* DESC: TEST *
* GROUP: (1) One script for everything *
* *
* FILTER: 1 ACTION: INCLUDE *
* QUEUE MANAGER EQ TEST *
* OBJECT/QUEUE EQ Q1 *
* EVENT EQ PUT *
* FILTER: 2 ACTION: INCLUDE *
* QUEUE MANAGER EQ TEST *
* OBJECT/QUEUE EQ Q2 *
* EVENT EQ GET *
* *
* RECORDING ALL DATA FROM GETS, ALL DATA FROM PUTS *
* DETAIL DATA IS TRANSLATED FROM ASCII TO EBCDIC *
* SAMPLE DATA IS TRANSLATED FROM ASCII TO EBCDIC *
* DEFAULT MQAPI SCRIPT TAG PARAMETERS ARE INCLUDED *
* *
* REPOSITORY NAME: COMPWARE.REPOS *
* LOG . . . . . : COMPWARE.LOG(LOG004) *
* SCRIPT . . . . : COMPWARE.SCRIPT *
* *
************************************************************************
* SCRIPT NUMBER(1)
*
MQGROUP -
ID(1)-
STIME('2006/06/26_10:55:59.885251')
SCRIPT(SCR004)
******************************** Bottom of Data ********************************
MQ log STEPLIB overrides
This function allows you to add extra STEPLIB data sets to the supplied JCL and procedures contained in the MQ log data set for replaying MQ scripts. This is useful for defining a specific level of WebSphere MQ for use with a particular script relay.
The additional STEPLIB data sets are defined in the HSCM common PARMLIB.
Up to two extra STEPLIB data sets can be defined by assigning their fully qualified names to variables TEMPSTP1 and/or TEMPSTP2 as shown. You can use the system symbolic $SYSNAME in the data set name to identify different data set names depending on LPAR.
Once defined, the STEPLIB data sets are added to the JCL generated in the MQ log as part of the MQ script create process. A sample MQ log, including generated JCL and the overriding STEPLIB definition, is shown in the following figure. The generation of replay JCL in an MQ log is controlled by the script create parameter, MQSCLJCL.
Sample MQ Log
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID
/*JOBPARM S=CW01
//*
//*
//UPROCS JCLLIB ORDER=('SYS2.COMPWARE.SQQFSAMP')
//*
//**********************************************************************
//* EXEC PROC TO PROCESS LOG/SORT/REPORT *
//**********************************************************************
//*
// SET ACTION=ANALYZE ANALYZE/PLAYBACK/other
//*
// SET CNTLDS=SYS2.COMPWARE.MQ.CONTROL
// SET REPTDS=SYS2.COMPWARE.MQ.REPORT
//*
// SET SCRIPT=USERID.WEBMQ.SCRIPT
// SET UNSORTED=&&UNSORTED
// SET SORTED=&&SORTED
//*
// SET COLLMEM=COLLECT
// SET REPTCNTL=MQRCTT
// SET REPTMEM=MQRANLZ
//*
//*
//ANALYZE EXEC PROC=MQPLAY1
//PROCESS.STEPLIB DD DISP=SHR,DSN=&LOAD
// DD DISP=SHR,
// DSN=SYS2.CPWR.COMPWARE.SQQFLOAD
//*
//**********************************************************************
//* *
//* TO ADD ADDITIONAL REPORT OUTPUT DATASETS, USE THE FOLLOWING *
//* HFS OR MVS DATASET MODEL CHANGING THE ddname TO THE NAME *
//* SPECIFIED ON THE REPORT INTO() STATEMENT *
//* *
//* //REPORT.ddname DD PATHMODE=(SIRWXU,SIRGRP,SIROTH), *
//* // PATHOPTS=(ORDWR,OCREAT), *
//* // PATH='/hfs/path/reptname.htm' *
//* *
//* or *
//* *
//* //REPORT.ddname DD DISP=SHR,DSN=sysout.dataset.name *
//* *
//**********************************************************************
//*
//LOGCOPY.INDD DD *
************************************************************************
* *
* HIPERSTATION WEBSPHERE MQ LOG STARTED ON 2006/02/17 AT 11:03:35 *
* *
* DESC: *
* GROUP: (1) One script for everything *
* *
* FILTER: 001 ACTION: INCLUDE *
* QUEUE MANAGER EQ * *
* *
* RECORDING ALL DATA FROM GETS, ALL DATA FROM PUTS *
* TIME STAMPS ARE SUPPRESSED IN SCRIPTS *
* DEFAULT MQAPI SCRIPT TAG PARAMETERS ARE INCLUDED *
* *
* REPOSITORY NAME: USERID.WEBMQ.SUBTEST4 *
* REPOSITORY NUMS: 1:9 *
* LOG . . . . . : USERID.WEBMQ.LOG($SUBD000) *
* SCRIPT . . . . : USERID.WEBMQ.SCRIPT *
* *
************************************************************************
*
* SCRIPT NUMBER(1)
*
MQGROUP-
ID(1)-
STIME('2004/08/30_12:20:44.398671')
SCRIPT(SUBD0000)
The MQ log references the MQPLAY1 PROC to perform script relay. The MQPLAY1 PROC is suppled in the Performance Test for WebSphere MQ sample library (COMPWARE.SQQFSAMP) member MQPLAY1. Within the MQPLAY1 PROC, the PROCESS STEP executes the script replay, so it is the PROCESS.STEPLIB DD that is overridden.
SET statements
SET ACTION
This statement defines which playback CONTROL member to use for the job. By default, it calls the ANALYZE member stored in the system-level playback control library. The ANALYZE member contains a CONTROL statement bearing the OFFLINE keyword, which processes the script without executing the MQ API command. Use this member to analyze script contents. Override the default with:
- PLAYBACK to call the CONTROL member that processes the script and executes the MQ API commands in the script. PLAYBACK is also stored in the system-level playback control library.
- the name of any CONTROL member stored in the system-level or your personal playback control library.
SET CNTLDS
This statement identifies the playback control library owning the assets you are using for this job. By default, it points to the system-level playback control library. This statement must point to the library in which the CONTROL member specified on the SET ACTION statement resides.
SET REPTDS
This statement identifies the report control library owning the assets you are using for this job. By default, it points to the system-level report control library. This statement must point to the library in which the REPORT and report CONTROL members specified on the SET REPTCNTL and SET REPTMEM statements reside.
SET SCRIPT
This statement identifies the library in which the scripts are stored. By default, it points to the library you specified on the WebSphere MQ Create Script - Output screen (WebSphere MQ Create Scripts - Output Screen) during script creation. All scripts played back or analyzed must reside in this library.
SET UNSORTED
This statement identifies where to store the data collected during the unattended playback job. It defaults to a temporary data set. The data written to this location has not been processed for reporting. There is no reason to override the temporary data set although you can, if desired.
SET SORTED
This statement identifies where to store the data collected and processed for reporting. It defaults to a temporary data set. Override this value with a permanent data set to save the information for generating reports later.
SET COLLMEM
This statement identifies the collection member to use for the job. By default, it calls a member named COLLECT, from the system-level playback control library, that collects all fields from all tables. Override it with:
- any COLLECT member stored in the library specified on the SET CNTLDS statement.
- NONE if you do not need to collect information for reporting.
SET REPTCNTL
This statement identifies the report CONTROL member to use for the job. By default, it calls MQRCTT from the system-level report control library. MQRCTT produces a text-based report in table format, that supports the default Script Analysis Report. Override it with:
- any report CONTROL member stored in the library specified on the SET REPTDS statement.
- NONE if you do not need a reporting CONTROL member. If the specified REPORT member provides all necessary control information, a report CONTROL member is unnecessary.
SET REPTMEM
This statement identifies the REPORT member to use for the job. By default, it calls MQRANLZ from the system-level report control library, which produces a default Script Analysis Report (See the following figure).
Script Analysis Report
-------------------------------------------------------------------------------------------------------
MQGroupNumber MQScriptNumber MQOpenQueueID MQOpenQueueName QMNA MQMessageCountQueue
-------------------------------------------------------------------------------------------------------
1 3 81 PDAPROD.CICSREG2 M520 1
1 3 86 PDAPROD.CICSREG2 M520 1
1 3 87 PDAPROD.CICSREG2 M520 1
1 3 98 PDAPROD.CICSREG2 M520 1
1 3 103 PDAPROD.CICSREG2 M520 1
1 3 104 PDAPROD.CICSREG2 M520 1
1 3 116 PDAPROD.CICSREG2 M520 1
HIPERSTATION FOR WEBSPHERE MQ - MQMessage Report Date: 06/04/07 10:52 Page: 1
-------------------------------------------------------------------------------------------------------
QMAQ MQMessageOutbound MQMessageInbound MQME
-------------------------------------------------------------------------------------------------------
CSQ1:PDAPROD.CICSREG1.C USR2312 AMERICANFASTNERS
CSQ1:PDAPROD.CICSREG1.C 0000000000000000000000000 000000000000000000000000
CSQ1:PDAPROD.CICSREG1.C 0AMERICANFASTNERS 0AMERICANFASTNERS
CSQ1:PDAPROD.CICSREG1.C USR2312 AMERICANFASTNERS
CSQ1:PDAPROD.CICSREG1.C USR2312 BOLTSNNUTS+
CSQ1:PDAPROD.CICSREG1.C 0000000000000000000000000 000000000000000000000000
CSQ1:PDAPROD.CICSREG1.C 0BOLTSNNUTS+ 0BOLTSNNUTS+