Specifying a JCL command stream
This topic describes a typical batch job that creates a detail report and a bpd file. The JCL command stream and the DD statements are described to enable you to write your customized batch job.
About this task
Note that you can use and modify the JCL sample provided in data set member prefix.TKO2SAMP(BPOQBTCH). It is usually more current than the example in this information.
In the following example the Buffer Pool Analyzer is installed under the high-level qualifier db2bpa. The batch job creates three different activity reports (using the REPORT subcommand with different options) and a trace data file (using the FILE subcommand without any option).
//*******************************************************************//
//* *//
//* MODULE NAME : BPOQBTCH *//
//* *//
//* DESCRIPTION : DB2 BPA Batch Sample Job *//
//* *//
//* COPYRIGHT : IBM DB2 Buffer Pool Analyzer for z/OS V5R4M0 *//
//* Licensed Materials - Property of IBM *//
//* 5655-W35 (C) Copyright IBM Corp. 2001, 2016 *//
//* *//
//* STATUS : Version 5.4.0 *//
//* *//
//* FUNCTION : Create Batch Reports and a File *//
//* *//
//* *//
//* Notes = *//
//* 1. ADD A VALID JOB CARD *//
//* 2. Change the INPUTDD and BPFILDD1 DD statements *//
//* The commands in the SYSIN DD file can be changed *//
//* as described in the BPA User's Guide *//
//*End of Specifications*********************************************//
//*
//DB2BP EXEC PGM=DB2BP
//* CHANGE THE PREFIX OF THE LIBRARY db2bpa
//STEPLIB DD DSN=db2bpa.RKANMOD,DISP=SHR
//* DD statement for trace data set
//INPUTDD DD DISP=SHR,DSN=bpa.trace.dataset
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//* DD statement for messages referring to the trace data set
//JOBSUMDD DD SYSOUT=*
//* DD statement for messages referring to execution of the job phases
//DPMLOG DD SYSOUT=*
//* DD statement for second report
//BPAREP2 DD SYSOUT=*
//* DD statement for File, change parameters according to your needs
//BPFILDD1 DD DISP=(NEW,CATLG),DSN=file.name,
// DCB=(RECFM=VBS,BLKSIZE=9076,LRECL=32756),UNIT=SYSDA,
// SPACE=(9096,(1000,500),RLSE)
//* DD statement for BPA commands and parameters
//SYSIN DD *
* Global command to adjust reported GMT to local time
GLOBAL
timezone (-1:00)
* Command with subcommands to create buffer pool activity Reports
* and File with data to be loaded into a DB2 table or used on the
* client for graphical display or for expert analysis
BPACTIVITY
* Default report, output goes to default DD name BPREPDD
REPORT
* Following report has data summarized by plan, buffer pool id, and
* page set. The data are sorted by plan and number of getpages.
* Only the first 5 combinations of buffer pool id and page set
* per plan are reported and the remainder.
REPORT
level(detail)
order(planname-bpid-qpageset
sortby(planname,getpage) top(5))
* Output goes to DD name BPAREP2
ddname(bparep2)
* The next is a summary report where only the 11 most
* active page sets in terms of asynchronous page activity is
* produced. Buffer pool activity is always there.
REPORT
level(summary)
order( sortby(asyncpage) top(11))
* Output goes to the same DD name as the previous report.
ddname(bparep2)
* File, output goes to default DD name BPFILDD1
FILE
* EXEC command terminates reading of command input and starts
* processing of trace input.
EXEC
//
- INPUTDD
- Lists one or more input data sets that contain trace data to be
used to create activity reports and buffer pool data files. Usually,
this is the data that you collected with the Collect Report Data (CRD)
function of Buffer Pool Analyzer. The name of the input data set usually
has a low-level qualifier of TRACE, as explained
in Configuring a collect task.
The default ddname for the input data set is INPUTDD. If you specify a different ddname, use the INPUTDD option of the GLOBAL command. In this case, ensure that your JCL includes a valid DD statement for the new name.
You can also use DB2® trace data that is created by other means, such as data in GTF or SMF data sets, and it is generally possible to process multiple input data sets. See Concatenating trace data for activity reports and bpd files for more details.
- SYSOUT
- Contains messages from DFSORT. If SYSOUT is not specified, it is dynamically allocated to the SYSOUT message class of the job. The format of SYSOUT is RECFM=FBA, LRECL=133, BLKSIZE=6251.
- JOBSUMDD
- If specified, it contains the job summary log and the IFCID frequency distribution log. The format of JOBSUMDD is RECFM=FBA, LRECL=133, BLKSIZE= 6251.
- DPMLOG
- Contains messages from the Buffer Pool Analyzer command processor. If DPMLOG is not specified, it is dynamically allocated to the SYSOUT message class of the job. The format of DPMLOG is RECFM=FBA, LRECL=133, BLKSIZE=6251.
- BPRPTDD
- Contains the output from the BPACTIVITY REPORT subcommand.
If BPRPTDD is not specified, it is dynamically allocated to the SYSOUT
message class of the job. The format of BPRPTDD is RECFM=FBA, LRECL=81,
BLKSIZE=8100.
If multiple REPORT subcommands are used, the resulting activity reports are written to BPRPTDD in corresponding sequence.
If you specify a different ddname with the DDNAME option of the REPORT subcommand, ensure that your JCL includes a valid DD statement for the new name.
- BPFILDD1
- Contains the output from the BPACTIVITY FILE subcommand.
This is the bpd file that can be used on the client for viewing performance
data and optimizing object placements. Also, its content can be loaded
into Db2 tables. Ensure that your JCL contains a valid
DD statement for this ddname. The format of BPFILDD1 is RECFM=VB,
LRECL=9072, BLKSIZE=9076. The DD statement should specify a data set
name with a low-level qualifier of
BPD
(for buffer pool data). After this data set is downloaded to the client, it must have a file name extension of bpd.If you specify a different ddname with the DDNAME option of the FILE subcommand, ensure that your JCL includes a valid DD statement for the new name.
- BPWORK
- If specified, it determines where Buffer Pool Analyzer stores
its temporary data, which can be up to 68 MB. Usually, this data set
is created on the MVS-defined work volumes and deleted by Buffer Pool
Analyzer. Use BPWORK if you want to control placement or size of the
data set, or if you receive a B37 abend. The format of BPWORK is RECFM=VBS,
LRECL=32756, BLKSIZE=6233.
Do not specify DUMMY or DISP=MOD for this data set.
- SYSIN
- This DD statement is mandatory. It contains the commands to be
run by the job stream.
The format of SYSIN is RECFM=FB, LRECL=80, BLKSIZE=6160.