Using cleanup options

The cleanup options help you recover z/OS® jobs and started tasks by deleting or uncataloging data sets that were created in the failing job, and cataloging data sets that were uncataloged. Without cataloging or deleting data sets, a rerun will fail with an error message saying that a data set already exists, is already cataloged, or is not found.

The scheduler restores the catalog status of data sets from the restart step, up to and including the failing step. It cannot restore the data set itself. The scheduler deletes or uncatalogs the data set if it was created and catalogs it if it was uncataloged.

Restart and cleanup works like this:
  1. The scheduler retrieves the job log.
  2. It makes a list of actions to restore the data set status. All data sets defined with DISP=NEW are marked as eligible for potential deletion. The operator can refuse the deletion if this action is not in line with the logic of the job to be restarted.
  3. Depending on the kind of restart and cleanup requested (job restart, step restart, or standalone cleanup) and the cleanup type set (automatic, immediate, or manual), the cleanup is completed in one of the following ways:
    • At the time the job is submitted by the controller, a step is added to the JCL before the existing steps.

      The name of the added step is EQQCLEAN. It uses as input the list of data sets to be deleted, cataloged, or uncataloged. This list is obtained from the history of previous runs. To get this history, the controller requests the job log from the data store and then merges the history in the local repository of the controller.

    • A single-step job, created by the controller, is run before the job run.

You can modify or browse cleanup information from a number of places in HCL Workload Automation for Z. In most cases, you will probably be using the HANDLING OPERATIONS ENDED IN ERROR panel to browse, modify, execute, or discard cleanup actions. When you select a job restart, the MODIFYING CLEANUP ACTIONS panel, shown in EQQMCMDL - Modifying cleanup actions, is displayed.

Figure 1. EQQMCMDL - Modifying cleanup actions
 EQQMCMDL ----------------- MODIFYING CLEANUP ACTIONS --------- Row 1 to 1 of 1 
                                                                                
 Enter GO  to confirm the selection, DISCARD  to exclude all the actions,       
       END  to save the selection, CANCEL  to exit without saving.              
 Row commands:   I  to include the data set in the actions                      
                 X  to exclude the data set from the actions                    
                                                                                
 Application           : PAYDAILY          00/12/13 20.36                       
 Operation             : CPU 1                                                  
 Jobname and jobid     : PAYDAILY          JOB01475                             
                                                                                
 Row Sel Stepname Data Set name                                 Act Volser  Prot 
 cmd                                                                            
 ''' I   S1       OPCSSD.RITAAUTO.DEC13                        D   OP2802  N    
 ******************************* Bottom of data ********************************
The scheduler maintains status information to describe the progress of the cleanup action. If you use RC, include the CLN_Ty and CLN_Re status fields in your ended-in-error layout. After the request for cleanup, you also can view the cleanup status for processes not yet completed on the OPERATION RESTART AND CLEANUP panel. The panel displays the status, dynamically updated at each step of the pending process. The statuses can be summarized in the following way:
  • Collecting job log data
  • JCL tailoring in progress
  • Process started
When the cleanup action ends, the Cleanup Result field displays Completed or Ended in Error.
To view the result of a cleanup action, select option 4 (DISPLAY CLEANUP) on the OPERATION AND RESTART CLEANUP panel. The VIEW CLEANUP RESULTS panel is displayed; it provides the following status information:
  • Whether the data set cleanup was completed or ended-in-error
  • The job name and job ID that performed the cleanup actions
  • Whether HCL Workload Automation for Z removed the data set from the catalog, uncataloged the data set, or cataloged the data set