Automatic recovery processing and data set cleanup
- The automatic recovery function detects the recovery statements and check the type of cleanup.
- If the cleanup type is set to None, the recovery actions are immediately performed. If the cleanup type is set to Immediate or Manual, the recovery actions are postponed.
- For the immediate cleanup type, the cleanup actions are started automatically by the scheduler. For the manual cleanup type, you need to request the cleanup actions by selecting the Start Cleanup with AR option.
- Automatic recovery processing waits until after HCL Workload Automation for Z finishes
the data set cleanup. When the cleanup status is set to Complete,
the recovery actions are performed.
If the cleanup type is set to Automatic, no recovery action is taken and an error message is issued.
- If IMMEDLOGIC(BESTSTEP), the action starts from the best step
- If IMMEDLOGIC(FIRSTSTEP), the action starts from the first step
In some situations, you might decide to create a logic for job runs that bypasses the need for data set cleanup. You do not have to wait for the cleanup, because automatic recovery adds a new occurrence, which does not depend on the cleanup of the data set. When you specify in the AROPTS initialization statement the CHKRESTART(Y) parameter, the recovery actions are executed immediately whether or not data set cleanup is required.
Example of data set Cleanup with Automatic Job Recovery shows how data set cleanup and automatic recovery can work together to ensure that a job is cleaned up and restarted.
In Example of data set Cleanup with Automatic Job Recovery, the job is designed to fail in STEPFAIL with a JCL error. Automatic recovery statements specify that when this error occurs, the step is to be deleted and the job rerun. Without data set cleanup, the job fails immediately in STEP1 with a JCL error: duplicate data set. When cleanup is active for the operation, the automatic recovery action is postponed until the cleanup action is completed or discarded.
For more information, see Restart and cleanup.