What you need for restart and cleanup

About this task

This function is a combination of restart and data set cleanup functions. They can be completed together or separately depending on the operation definition and the use of the panels. To set up restart and data set cleanup, perform the following steps:
  1. Install and customize the data store on each z/OS® image where jobs will run. Specify the FLOPTS parameter values for the controller.
  2. Specify RCLEANUP (YES) on both the OPCOPTS controller statement and the BATCHOPT daily plan batch statement.
  3. Specify the RCLOPTS DSTDEST value equal to the data store SYSDEST parameter on the DSTOPTS statement.
  4. Specify the MSGLEVEL (1,1), if this is not the default for the jobs.
  5. If you need data set cleanup before a job rerun, specify the cleanup type to any type but NONE for the operation.
  6. Make the EQQCLEAN procedure available in all systems where the jobs can run.
    Note: If you are running on z/OS® system Version 1 Release 2 or later, restart and cleanup does not function properly when the SPIN option for the JES job output is used. Therefore, use the SPIN parameter to prevent MVS JOBLOG SPIN. For details, see Customization and Tuning.
  7. Customize the job-submit exit (EQQUX001) as suggested in the provided sample, if you want the same user to own both the stand alone cleanup job and the original job.

    For details about the stand alone cleanup job, see Selecting cleanup options, Immediate option. For details about the job-submit exit, see Job-submit exit.