Interface to the exit

The automatic-job-recovery exit is invoked in task mode, problem state, and key 8 and the job-step task is APF-authorized. The active task runs with the same access authority as the job-step task. The exit must restore this state before returning to its caller.

Control is passed to the exit using the BAL instruction. The exit must return to its caller using the address and addressing mode passed to it in general register 14.

The exit is entered in AMODE 31 but must switch to AMODE 24 before performing any input or output operations, and then switch back to AMODE 31 before returning to the caller.

If the exit abends, it is flagged as not executable; Tivoli Workload Scheduler for z/OS does not try to call the exit again.

When the exit is entered, register 1 contains the address of the parameter list. Each address in this list is used to locate the parameter value. These parameters are passed to the exit:

Automatic-job-recovery exit parameters

REC    DS  CL80  (JCL record)
S      DS  CL8   (Name of failed step,
                   or blank if error not associated with a step)
PS     DS  CL8   (Name of failed step in procedure, or blank)
JC     DS  CL4   (Job return code or error code)
SC     DS  CL4   (Return code or error code of failing step,
                   blank if error not associated with a step)
UF     DS  F     (User field, first time zero)
IND    DS  F     (Indicator:
                   0  First record
                   1  Another record than first
                   2  No more records in file)
RC     DS  F     (Return code)

The S and PS fields contain blanks if the error occurred in the initialization or completion phase of the job. The fields are also blank if there is no name on the EXEC statement.

The return code to be set by the exit (RC) is dependent on the IND value. For IND=0 and IND=1, the RC values (given as hexadecimal digits) have the following meaning:

00
Save the record (possibly updated) and return the next one.
04
Insert the record (a new one in REC) and return the same record as last time.
08
Delete the record and return the next one.
0C
No more inspection needed. Update the JS file and continue recovery actions for this job.
10
Terminate recovery actions for this job after updating the JS file.
14
Terminate recovery actions for this job without updating the JS file.

For IND=2, the RC values (given as hexadecimal digits) have the following meaning:

00
Invalid.
04
Insert the record (a new one in REC) and return control.
08
Invalid.
0C
No more inspection needed. Update the JS file and continue recovery actions for this job.
10
Terminate recovery actions for this job after updating the JS file.
14
Terminate recovery actions for this job without updating the JS file.

To inspect all JCL lines before making any changes, copy the JCL lines to your own area. Return RC=08 until IND=2 is received. Then modify the JCL and return the lines one by one to Tivoli Workload Scheduler for z/OS with RC=04 specified. End by returning RC=0C.