Plan Analyzer for Db2 for z/OS (PPA) has various online reports. Can the same report information be generated by a batch job?
DB2 for Z/OS
Release : R20
Plan Analyzer online reports can be also executed via a batch job.
Submitting a batch job for Plan Analyzer report:
1. As an example, using a Package/List Report from Catalog Reporting enter the BATCH command as below.
----------- PPA Package List ----------- yyyy/mm/dd hh:mm
COMMAND ===> BATCH SCROLL ===> CSR
LINE 1 OF 3 >
Option ===> PK Report ===> L
Collection ===> TESTPRGA Package ===> * Where ===> N
----------------------------------------------------------------- authid1
Location ===> LOCAL DB2 SSID ===> ssid Version ===> 121M500
CMD PACKAGE COLLECTION VERSION COPYID OWNER
____ TESTPRGA TESTPRGA 2019-11-29-05.10.54.663986 CURRENT authid1
____ TESTPRGA TESTPRGA 2019-12-20-05.41.57.701514 CURRENT authid1
____ TESTPRGA TESTPRGA 2019-12-20-05.50.54.979999 CURRENT authid1
******************************* BOTTOM OF DATA ********************************
The next screen presents the job submission details for review and possible alteration.
-------- PPA Batch Reporting Job Submission -------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 20
Option ===> S ( S - Submit, E - Edit, D - Write to Dataset )
Action ===> ( B - Bind, R - Rebind, F - Free )
----------------------------------------------------------------- authid1
JOBCARD ===> //authid1A JOB (nnnnnnnnn),'Batch',CLASS=A,MSGCLASS=X, << This jobcard is set by the user and obtained from the PPA PROFILE,
===> // NOTIFY=authid1,REGION=0M,TIME=1440 << option 1 and then option 3 - Job Card Specification.
===> /*JOBPARM SYSAFF=lpar << The jobcard specification here is saved for the current user only.
===>
SYSOUT ===> * (JES SYSOUT class to be used)
******************************** REPORT INPUT *******************************
USERID = (authid1)
SSID = (ssid)
LOCATION = (LOCAL)
ACM = (N,ACMNEW)
LINES = (55)
LINESZ = (200)
PROCDDF = (Y)
OPTION = (PK)
FLOATFMT = (ENG)
PLANEXPL = (BOTH)
DBOPT = (ALL)
DBRANGE = (001)
REPORT = (L) <<
COLLID = (TESTPRGA) << The search criteria from the online screen have been copied in.
PACKAGE = (*) <<
VERSION = (ALL)
PKGCOPY = (N)
REPVER = (Y)
EQF = (N)
GENERATE
******************************** BOTTOM OF DATA *******************************
Other settings above such as VERSION and PKGCOPY among others come from the profile settings and default options.
On this screen the code to be submitted can be edited or written to a dataset in the OPTION field. Take care if you edit the parms manually!!
When submitted using an "S" in the OPTION field above the result looks like this in SYSOUT:
USERID = (authid1)
SSID = (ssid)
LOCATION = (LOCAL)
ACM = (N,ACMNEW)
LINES = (55)
LINESZ = (200)
PROCDDF = (Y)
OPTION = (PK)
FLOATFMT = (ENG)
PLANEXPL = (BOTH)
DBOPT = (ALL)
DBRANGE = (001)
REPORT = (L)
COLLID = (TESTPRGA)
PACKAGE = (*)
VERSION = (ALL)
PKGCOPY = (N)
REPVER = (Y)
EQF = (N)
GENERATE
yyyy/mm/dd hh:mm
Rel 20.0.12 PPA Package List
CMD PACKAGE COLLECTION VERSION COPYID OWNER >>>>There are more columns to the right up to column 200>>>>
TESTPRGA TESTPRGA 2019-11-29-05.10.54.663986 CURRENT authid1
TESTPRGA TESTPRGA 2019-12-20-05.41.57.701514 CURRENT authid1
TESTPRGA TESTPRGA 2019-12-20-05.50.54.979999 CURRENT authid1
******************************************************************************
Report successfully generated/printed
END
********************************** End of Data ******************************
The BATCH command is available on all the reports in Catalog Reporting.