Use Plan Analyzer(PPA) to generate the control cards to free a package version via the Batch Processor. The generated control cards should be submitted to the
Batch Processor either online or by a batch job.
DB2 for Z/OS
Release : R20
From the PPA main menu, select option PU Plan/Package Utilities.
Enter the Package name or Collid ===> * Package ===> TEST% search criteria as desired and pair this with an EQF using the provided WHERE clause.
-------------- PPA Package Utilities -------------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 9 >
Collid ===> * Package ===> TEST% Where ===> S TEMP
----------------------------------------------------------------- authid1
Location ===> LOCAL DB2 SSID ===> ssid Version ===> 121Mnnn
CMD PACKAGE COLLECTION VERSION COPYID OWNER
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-01.59.10.093227 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-12-20-06.53.19.603368 CURRENT authid1
____ TESTPRGA TESTPKGA 2019-11-26-01.59.10.093227 CURRENT authid1
____ 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
____ TESTPRG2 TESTPRG2 2020-04-30-04.03.14.231157 CURRENT authid1
******************************* BOTTOM OF DATA ********************************
Then enter the 'F' line command on the Package Report to FREE a package version.
-------------- PPA Package Utilities -------------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 9 >
Collid ===> * Package ===> TEST% Where ===> S TEMP
----------------------------------------------------------------- authid1
Location ===> LOCAL DB2 SSID ===> ssid Version ===> 121Mnnn
CMD PACKAGE COLLECTION VERSION COPYID OWNER
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-01.59.10.093227 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-12-20-06.53.19.603368 CURRENT authid1
F___ TESTPRGA TESTPKGA 2019-11-26-01.59.10.093227 CURRENT authid1 <==== free just one version
____ 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
____ TESTPRG2 TESTPRG2 2020-04-30-04.03.14.231157 CURRENT authid1
Batch processor commands are generated on screen that can be executed online or in batch as desired.
--------- PPA Batch Processor Card Display --------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 4
Mode ===> O ONLINE
The following Batch Processor input has been generated. Press ENTER
to process, press END to cancel, or enter the EDIT command to edit.
----------------------------------------------------------------- authid1
********************************* TOP OF DATA *********************************
.CALL DSN PARM(ssid)
.DATA
FREE PACKAGE ( TESTPKGA.TESTPRGA.(2019-11-26-01.59.10.093227) );
.ENDDATA
******************************** BOTTOM OF DATA *******************************
Enter and....the commands above are executed online providing this audit trail.
BPPAUDT ----------- AUDIT Message File ----------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ==> CSR
------------------------------------------------------------- USER ID: authid1
.LIST TERM
RETCODE = 0
.CONNECT SSID
BPA0198I: CURRENT FUNCTION LEVEL IS V121Mnnn
RETCODE = 0
.OPTION NOERRORS
RETCODE = 0
.CALL DSN PARM(ssid)
.ALLOC UNIT(SYSDA) FI(SYSTSIN) NEW SPACE(2,20) CYL +
RECFM(F,B) LRECL(80) BLKSIZE(0)
.ALLOC UNIT(SYSDA) FI(SYSTSPRT) NEW SPACE(4,80) CYL +
RECFM(V,B,A) LRECL(75) BLKSIZE(6324)
.DATA
FREE PACKAGE ( TESTPKGA.TESTPRGA.(2019-11-26-01.59.10.093227) );
.ENDDATA
FREE PACKAGE ( TESTPKGA.TESTPRGA.(2019-11-26-01.59.10.093227) );
DSNT232I !SSID SUCCESSFUL FREE FOR
PACKAGE =
location.TESTPKGA.TESTPRGA.(2019-11-26-01.59.10.093227)
.FREE FI(SYSTSIN)
.FREE FI(SYSTSPRT)
RETCODE = 0
CONTROL PROCESS CARD:
BATCH PROCESSOR PLAN ===> RBPAP200
BATCH PROCESSOR ID ===> (NONE)
STRATEGY NAME ===> (NONE)
DEVICE ALLOCATION UNIT => SYSDA
***** BATCH PROCESSOR COMPLETE *****
******************************** BOTTOM OF DATA *******************************
Instead of using the "F" line command, usage of the "FO" line command allows the user to modify the PLANMGMTSCOPE and INVALIDONLY
parameter before the control cards are generated.
------------- PPA FREE PACKAGE Options ------------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 8
PARAMETERS OPTION VALID OPTIONS
PACKAGE Location.
COLLECTION TESTPRGA Collection.
MEMBER TESTPRGA Package
VERSION 2019-11-29-05.10.> (Version)
PLANMGMTSCOPE ALL INACTIVE | PREVIOUS | ORIGINAL | ALL
INVALIDONLY NO NO | YES
******************************* BOTTOM OF DATA ********************************
Then having made modifications as desired , enter, the code is generated now including these two parms explicitly.
--------- PPA Batch Processor Card Display --------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 6
Mode ===> O ONLINE
The following Batch Processor input has been generated. Press ENTER
to process, press END to cancel, or enter the EDIT command to edit.
----------------------------------------------------------------- authid1
********************************* TOP OF DATA *********************************
.CALL DSN PARM(ssid)
.DATA
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-11-29-05.10.54.663986) ) -
PLANMGMTSCOPE ( ALL ) -
INVALIDONLY ( NO );
.ENDDATA
******************************** BOTTOM OF DATA *******************************
Also, another alternative to using the "F" line command, usage of the "FA" line command allows the user to FREE all the versions
of one package in one go.
-------------- PPA Package Utilities -------------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 8 >
Collid ===> * Package ===> TEST% Where ===> S TEMP
----------------------------------------------------------------- authid1
Location ===> LOCAL DB2 SSID ===> ssid Version ===> 121Mnnn
CMD PACKAGE COLLECTION VERSION COPYID OWNER
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-01.59.10.093227 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-12-20-06.53.19.603368 CURRENT authid1
FA__ TESTPRGA TESTPRGA 2019-11-29-05.10.54.663986 CURRENT authid1 <---
____ TESTPRGA TESTPRGA 2019-12-20-05.41.57.701514 CURRENT authid1 <--- Free these three versions
____ TESTPRGA TESTPRGA 2019-12-20-05.50.54.979999 CURRENT authid1 <---
____ TESTPRG2 TESTPRG2 2020-04-30-04.03.14.231157 CURRENT authid1
******************************* BOTTOM OF DATA ********************************
TESTPRGA has three versions listed above......
This is the code generated:
--------- PPA Batch Processor Card Display --------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 6
Mode ===> O ONLINE
The following Batch Processor input has been generated. Press ENTER
to process, press END to cancel, or enter the EDIT command to edit.
----------------------------------------------------------------- authid1
********************************* TOP OF DATA *********************************
.CALL DSN PARM(ssid)
.DATA
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-11-29-05.10.54.663986) );
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-12-20-05.41.57.701514) );
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-12-20-05.50.54.979999) );
.ENDDATA
******************************** BOTTOM OF DATA *******************************
This may be very useful if a cleanup of a large number of versions of one package is required.
The FREEPACK primary command can also be used to free the packages listed on any package-listing screen.
When this command is used, the PPA Batch Processor Card Display appears for your review prior to processing.
If FREEPACK is issued on a package list, which contains triggers, the triggers will be ignored.
-------------- PPA Package Utilities -------------- yyyy/mm/dd hh:mm
COMMAND ===> FREEPACK SCROLL ===> CSR
LINE 1 OF 8 >
Collid ===> * Package ===> TEST% Where ===> S TEMP
----------------------------------------------------------------- authid1
Location ===> LOCAL DB2 SSID ===> ssid Version ===> 121Mnnn
CMD PACKAGE COLLECTION VERSION COPYID OWNER
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-00.56.03.102668 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-11-26-01.59.10.093227 CURRENT authid1
____ TESTPRGA DSN_DEFAULT_COLLI> 2019-12-20-06.53.19.603368 CURRENT authid1
____ 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
____ TESTPRG2 TESTPRG2 2020-04-30-04.03.14.231157 CURRENT authid1
******************************* BOTTOM OF DATA ********************************
Enter and code to free all the packages listed above that was returned by the search criteria is generated.
--------- PPA Batch Processor Card Display --------- yyyy/mm/dd hh:mm
COMMAND ===> SCROLL ===> CSR
LINE 1 OF 15
Mode ===> O ONLINE
The following Batch Processor input has been generated. Press ENTER
to process, press END to cancel, or enter the EDIT command to edit.
----------------------------------------------------------------- authid1
********************************* TOP OF DATA *********************************
.CALL DSN PARM(ssid)
.DATA
FREE PACKAGE ( DSN_DEFAULT_COLLID_TESTPLNA.TESTPRGA.(2019-11-26--
00.56.03.102668) );
FREE PACKAGE ( DSN_DEFAULT_COLLID_TESTPLNB.TESTPRGA.(2019-11-26--
00.56.03.102668) );
FREE PACKAGE ( DSN_DEFAULT_COLLID_TESTPLNB.TESTPRGA.(2019-11-26--
01.59.10.093227) );
FREE PACKAGE ( DSN_DEFAULT_COLLID_TESTPRGA.TESTPRGA.(2019-12-20--
06.53.19.603368) );
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-11-29-05.10.54.663986) );
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-12-20-05.41.57.701514) );
FREE PACKAGE ( TESTPRGA.TESTPRGA.(2019-12-20-05.50.54.979999) );
FREE PACKAGE ( TESTPRG2.TESTPRG2.(2020-04-30-04.03.14.231157) );
.ENDDATA
******************************** BOTTOM OF DATA *******************************