Automatic recovery (AR)

The automatic recovery (AR) subtask handles automatic recovery requests. A z/OS job, a started-task procedure, or a job using the centralized script can contain recovery statements that specify an error situation and the recovery actions to be performed if the job or procedure fails during processing.

The AR subtask scans the failing jobs or started tasks for a recovery statement that matches the particular error. If a matching recovery statement is found, the requested recovery actions are performed. When a recovery statement matches an error condition it is changed by HCL Workload Automation for Z to a JCL comment statement.

RECOVER statements are defined in the job input as z/OS® statements. The statement is changed when the operation is submitted to a valid comment statement for the target operating system. The image of the job input in the JOBLIB is not altered.

The following input is needed for the AR subtask:
  • The job-name-table record of the current plan. When the job or procedure is run, this record saves error information, the completion codes of each step executed, and the job completion code.
  • The ended-in-error record of the current plan. When a job or started-task procedure ends in error and an ended-in-error entry is created, an indicator is set in this entry. This indicator shows that the JCL or procedure should be checked for automatic recovery statements. The indicator can also be set at a later time from the HANDLING OPERATIONS ENDED IN ERROR panel in the MODIFY CURRENT PLAN dialog. The AR subtask resets the indicator when you select the entry for processing.
  • The JCL repository (JS) data set. The AR subtask gets the JCL and automatic recovery statements for the failed job from this file.
  • An event control block (ECB) in the normal-mode-manager control block NMMARECB. When this ECB is posted, AR investigates the ended-in-error records of the current plan for automatic recovery requests.
  • Options of the AROPTS initialization statement. Using these options, you can restrict when an automatic recovery should be performed.
  • The case code macro EQQCASEC.
  • A list of case code definitions created by EQQCASEC.

AR invokes other components of the HCL Workload Automation for Z subsystem. The logical-file-handler component is called to accomplish the VSAM input/output operations that are required. The modify-current-plan function of the HCL Workload Automation for Z subsystem is called to perform the actions specified in the recovery statement.