Package Master Housekeeping
This section describes housekeeping tasks that maintain the package master VSAM file.
Unload/Back Up Package and Component Masters
When you "back up" the VSAM package master, component master, and long name component master to create a restore point for the data, use utility program CMNBKRST, which creates QSAM files that can be used to forward recover a damaged master file. You cannot use an IDCAMS backup to forward recover a damaged file.
**Sample JCL Member | BACKUP |
**Utilities | CMNBKRST with the BACKUP parameter |
**Suggested Frequency | Daily |
**SERNET Status | The ChangeMan ZMF instance where the VSAM files are used must be down. |
**Process Steps | Unload package master VSAM, component master VSAM, and long name component master VSAM files to QSAM files. |
**Comments | You can create separate jobs to unload/back up the package master, the component master, and the long name package master. In program CMNBKRST, code DUMMY in the input and output DD statements for the files that you want exclude from processing. Utility program CMNBKRST is described in the Utilities chapter of the *ChangeMan ZMF Customization Guide. |
...
Load/Restore Package and Component Masters
Load the QSAM unload files created by utility program CMNBKRST to initialized VSAM KSDS package master, component master, and long name component master.
**Sample JCL Member | RESTORE |
**Utilities | IDCAMS CMNVINIT CMNBKRST with RESTORE parameter |
**Suggested Frequency | On request |
**SERNET Status | The ChangeMan ZMF instance where the VSAM files are used must be down. |
**Process Steps | ● Generate a dummy record for the long name component VSAM file. ● DELETE/DEFINE VSAM KSDS files for the package master, component master, and long name component master; repro a dummy record into each. ● Initialize the three VSAM files with program CMNVINIT. ● Using utility program CMNBKRST, load the three QSAM unload files created by the same program into the initialized VSAM files. |
**Comments | You can create separate jobs to load/restore the package master, the component master, and the long name package master. In program CMNBKRST, code DUMMY in the input and output DD statements for the files that you want exclude from processing. Utility program CMNBKRST is described in the Utilities chapter of the *ChangeMan ZMF Customization Guide. |
...
Recover Package and Component Masters
If a package master, component master, or long name component master VSAM file is damaged, use a prior version of a QSAM unload file and a current forward recovery CMNRECV file to load the old data and update it with more recent records in the forward recover file.
**Sample JCL Member | RESTORE |
**Utilities | IDCAMS CMNVINIT CMNBKRST with RESTORE parameter |
**Suggested Frequency | On request |
**SERNET Status | The ChangeMan ZMF instance where the VSAM files are used must be down. |
**Process Steps | ● Generate a dummy record for the long name component VSAM file. ● Copy the VSAM forward recovery file to QSAM for input to CMNBKRST. ● DELETE/DEFINE VSAM KSDS files for the package master, component master, and long name component master; repro a dummy record into each. ● Initialize the three VSAM files with program CMNVINIT. ● Use utility program CMNBKRST to load the three QSAM unload files created by the same program into the initialized VSAM files, updating the data with more recent records from the QSAM copy of the recovery file. |
**Comments | The forward recovery VSAM file CMNRECV contains recovery records for all three VSAM masters. You can omit a master file from forward recovery by coding DUMMY in the input and output DD statements for the file. Utility program CMNBKRST is described in the Utilities chapter of the *ChangeMan ZMF Customization Guide. |
...
Reorganize Package and Component Masters
Use utility program CMNBKRST, combining sample jobs BACKUP and RESTORE to create a job to reorganize the VSAM files.
**Sample JCL Member | BACKUP RESTORE |
**Utilities | CMNBKRST with the BACKUP parameter IDCAMS CMNVINIT CMNBKRST with RESTORE parameter |
**Suggested Frequency | Weekly |
**SERNET Status | The ChangeMan ZMF instance where the VSAM files are used must be down. |
**Process Steps | ● Unload package master VSAM, component master VSAM, and long name component master VSAM files to QSAM files. ● Generate a dummy record for the long name component VSAM file. ● DELETE/DEFINE VSAM KSDS files for the package master, component master, and long name component master; repro a dummy record into each. ● Initialize the three VSAM files with program CMNVINIT. ● Using utility program CMNBKRST, load the three QSAM unload files created by the same program into the initialized VSAM files. |
**Comments | You can create separate jobs to reorganize the package master, the component master, and the long name package master. In program CMNBKRST, code DUMMY in the input and output DD statements for the files that you want exclude from processing. Utility program CMNBKRST is described in the Utilities chapter of the *ChangeMan ZMF Customization Guide. |
...
Delete Aged Packages, Staging Libraries, And Component History
Use the aging days in application administration to delete package master records for aged installed packages, scratch aged staging libraries, and delete aged component history records. Delete all elements of memo deleted packages.
Caution
If you license the ChangeMan ZMF ERO Option, a release is deleted when the last change package attached to the release is aged and deleted. There is no indication in the housekeeping job SYSOUT that releases have been deleted.
JCL for this job is file tailored from skeleton CMN$$HKP by the Delete housekeeping task in Global Administration.
Create JCL for a batch housekeeping job by executing these steps on a ChangeMan ZMF 8.1 instance:
-
From the Primary Option Menu, select A Admin, then G Global, H Housekeeping, and then 1 Delete. (=A.G.H ;; 1) The Generate Housekeeping Job panel (CMNHOUS1) is displayed.
-
Follow the instructions on the panel to prepare the housekeeping job. (Use * in the Application field to run the job for all applications.)
-
Press Enter to submit and run the job. To generate JCL for the job without running the job, add TYPRUN=SCAN to the job statement, then press Enter.
-
Find the job output in SDSF. Enter line command SJ (show JCL) by the job name and press ENTER. The generated job JCL is shown in an ISPF edit session.
-
Copy the JCL to your CUSTOM CNTL library and edit it to suit your needs.
**Sample JCL Member | File tailored from skeleton CMN$$HKP |
**Utilities | CMNBKRST with the BACKUP parameter CMNBAT10, Report CMN920 CMNBATCH |
**Suggested Frequency | Weekly |
**SERNET Status | ChangeMan ZMF can be running. If it is not running, the CMNBATCH transactions are written to the Delay file and CMNBATCH gives RC=06. When ChangeMan ZMF is started, the transactions in the Delay file are processed, and package master records are removed and staging libraries are scratched. |
**Process Steps | ● Unload the VSAM package master, component master, and long name component master to QSAM. ● Execute report CMN920 in CMNBAT10 to age packages, staging libraries, component history, flag all elements of memo deleted packages for delete, and generate transactions for CMNBATCH. ● Process the CMNBAT10 transactions through CMNBATCH to physically delete package master records, package staging libraries, and component history records. |
**Comments | If you want to archive aged package and component records, run the job described in Archive Aged Package And Component Records before you run this job. The aging thresholds for installed packages, staging libraries, and component history are defined in application administration. There is no aging for memo deleted packages (status DEL). All elements of memo deleted packages are physically deleted when you run the online housekeeping delete function. When program CMNBATCH processes transactions generated by CMNBAT10 to delete aged component history, the last history record for a baselined component in a library type in an application is not deleted so that information is available for build processing and audit auto resolve. You can run a CMNBAT10 (report CMN920) to see what packages and staging libraries are aged and eligible for delete. Package records and staging libraries are not physically deleted until CMNBATCH processes a transaction file created by CMNBAT10. |
...
Archive Aged Package And Component Records
The job described in Delete Aged Packages, Staging Libraries, And Component History does not retain deleted package master or component master records for archive.
Sample job ARCHIVE1 uses aging criteria in application administration to split out package master, component master, and long name component master records for aged packages and component history that can be merged with cumulative archive files
Note the commented out section at the start that provides sample code to notify users by email or TSOID, only relevant if you are running z/OS 2.3 or later, and JES2..
Important
You must run the ARCHIVE1 job described here before you run the CMN$$HKP job described in Delete Aged Packages, Staging Libraries, And Component History so that the records you want to archive are still on the master files. However, you must discard the retained package and component master records written to DD names PMASTOUT, CMASTOUT, and CMASLOUT and NOT load them to the VSAM masters. You need the aged package master records for the CMN$$HKP job to scratch aged staging libraries. |
**Sample JCL Member | Combine BACKUP and ARCHIVE1 |
**Utilities | CMNBKRST with the BACKUP parameter CMNBAT40 SORT |
**Suggested Frequency | Weekly |
**SERNET Status | ChangeMan ZMF must be down. |
**Process Steps | ● Unload the VSAM package master, component master, and long name component master to QSAM. ● Run CMNBAT40 to separate out package master and component master records for aged packages and aged component history. ● Merge the records for aged packages and component history into cumulative archives for package master, component master, and long name component records. |
**Comments | The aging threshold for installed packages and component records is defined in application administration. NOTE: This job does not remove memo deleted packages, and it does not scratch aged staging libraries. See Delete Aged Packages, Staging Libraries, And Component History to perform those functions. |
...
Archive orphan component history records
The sample ARCHIVE3 job is used to filter out orphan component history records from the short and long component master files. It should be run on an ad hoc basis and does not need to be part of regular housekeeping.
The first run may create a lot of archive data, subsequent runs will generate much less.
The criteria for filtering is:
-
The component is NOT in arch/del status
-
The package for the component record does not exist in the package master file
If both of the above are true, eg component is not in arch/del status, AND there is no package in the package master file, the record is written to the archive file. If not, it is written to the output file. The output file(s) can then be reloaded to VSAM format, and the started task can be restarted using these files. The package master is not altered, only the component files.
Since these are orphan records, it is up to the customer if they want to merge these with their existing archive records, or keep a seperate archive for audit purposes.
The archive file names have been changed in ARCHIVE3, to prevent accidental merging with existing archives.
Before running this job, backup the master files to the PMASTIN, CMASTIN, and CMASLIN datasets in step "BAT70":
It is recomended you run the BAT70 step first and review the report, before deciding to merge archives, and reload master files. There are blank jcl lines to prevent steps after BAT70 from running by default.
Archive component history records from deleted applications
The sample ARCHIVE4 job is used to archive component history records, left behind from deleted packages, from the short and long component master files. It should be run on an ad hoc basis and does not need to be part of regular housekeeping. This job is used to filter out component history records from deleted applications from the short and long component master files.
It should be run on an ad hoc basis and does not need to be part of regular housekeeping.
The first run may create a lot of archive data, subsequent runs will generate much less.
Note
This utility will remove ALL component history records for a deleted application regardless of component status. That means it will remove the latest component history record per component/libtype/appl that regular housekeeping saves.
>>>> USE WITH EXTREME CARE. <<<<
The criteria for filtering is:
The application for the component record does not exist in the package master file.
If the rule above is true, eg component has no matching application in the package master file, the record is written to the archive file. If not, it is written to the output file. The output file(s) can then be reloaded to VSAM format, and the started task can be restarted using these files. The package master is not altered, only the component files.
Since these are dead records, it is up to the customer if they want to merge these with their existing archive records, or keep a separate archive for audit purposes.
The archive file names have been changed in this job, to prevent accidental merging with existing archives.
Synchronize Installation Calendar
Synchronize the installation calendar with the actual count of jobs scheduled for install on each date.
JCL for this job is file tailored from skeleton CMN$$HKP by the Synchronize housekeeping task in Global Administration.
Create JCL for a batch housekeeping job by executing these steps on a ChangeMan ZMF 8.1 instance:
-
From the Primary Option Menu, select A Admin, then G Global, H Housekeeping, and then 2 Synchronize. (=A.G.H / 2) The Generate Housekeeping Job panel (CMNHOUS1) is displayed.
-
Follow the instructions on the panel to prepare the housekeeping job. (Use * in the Application field to run the job for all applications.)
-
Press Enter to submit and run the job. To generate JCL for the job without running the job, add TYPRUN=SCAN to the job statement, then press Enter.
-
Find the job output in SDSF. Enter line command SJ (show JCL) by the job name and press ENTER. The generated job JCL is shown in an ISPF edit session.
-
Copy the JCL to your CUSTOM CNTL library and edit it to suit your needs.
Sample JCL Member | File tailored from skeleton CMN$$HKP |
Utilities | CMNBKRST with the BACKUP parameter CMNBATCH, Report CMN930 CMNBATCH |
Suggested Frequency | Weekly |
SERNET Status | ChangeMan ZMF can be running. If it is not running, the CMNBATCH transactions are written to the Delay file and CMNBATCH gives RC=06. When ChangeMan ZMF is started, the transactions in the Delay file are processed, and the installation calendar is updated. |
Process Steps | ● Unload the VSAM package master to QSAM. ● Execute report CMN930 in CMNBAT10 to tally packages scheduled for install by date and generate transactions for CMNBATCH. ● Process the CMNBAT10 transactions through CMNBATCH to update the installation calendar. |
...