Selection parameters

When a job or started task ends in error, this information is available for all executed steps:
  • Step name
  • Abend code, if step abended
  • Return code, if step did not abend
The selection parameters use this information:
ERRSTEP
If the recovery specification is for a specific step within a JCL procedure, specify ERRSTEP=stepname.procstepname.

If the recovery specification is for specific step within standard JCL, specify ERRSTEP=stepname.

Each step name you specify must correspond to a step in the job or started task. All steps in the JCL should have a name; these names should be unique.

Default: The recovery specification is for all steps.

JOBCODE
The code can be an abend code, an error code set by HCL Workload Automation for Z or JCC, a case code, a return code, or a return code range. (For more information on case codes, see Case code lists.) The values are those given as the error code on the HANDLING OPERATIONS ENDED IN ERROR panel in the MODIFYING THE CURRENT PLAN panel.
The JOBCODE keyword values are:
Sxxx
Specifies a system abend code.
Uxxx
Specifies a user abend code.
xxxx
Specifies a case code or an error code set by HCL Workload Automation for Z, either directly or by using the job completion checker.
n
Specifies a return code.
x-y
Specifies a return code range, where x and y represent positive decimal values.

The codes specified in the JOBCODE parameter are tested against the return code of the first abending step or against the job code as set by HCL Workload Automation for Z when the job or started task ends. This step is called the terminating step.

Note: When specifying the JOBCODE keyword values, you must use the formats of the system abend code, user abend code, and job return code described in Setting error codes.

You can also specify abend codes in generic form. Therefore, an asterisk (*) can represent any character, or any group of characters, in those positions where it is placed. A code can contain more than one asterisk only if each asterisk is separated from the next by another character.

Note: The JOBCODE=* notation covers all possible user and system abend codes; it does not cover return codes. To cover all possible return codes, specify a return code range in the form:
JOBCODE=x-y
where x and y represent positive decimal values.

A return code cannot be greater than 4095. To specify a range of values, set x to the lower value and y to the higher value. To specify all return codes greater than or equal to a certain value, set x to that value and y to 4095.

If you specify the ERRSTEP parameter as well as JOBCODE, the step that terminated the job or started task must be specified by the ERRSTEP parameter; otherwise, the RECOVER statement criteria are not met, and the statement is ignored.

Default: The default depends on whether the STEPCODE parameter is specified:
  • STEPCODE specified: the JOBCODE default is no recovery, and the recovery is controlled by the STEPCODE parameter.
  • STEPCODE not specified: the JOBCODE default is recovery for all codes, except those for which no automatic recovery is specified by the EXCLUDECC and EXCLUDERC keywords of the AROPTSstatement.
STEPCODE
The STEPCODE keyword value can be:
Sxxx
Specifies a system abend code.
Uxxx
Specifies a user abend code.
xxxx
Specifies a case code.
n
Specifies a return code.
x-y
Specifies a return code range, where x and y represent positive decimal values.
'FLSH'
Specifies that the step was flushed.

The return codes of the executed steps are tested against the parameter values and, if there is a match, the RECOVER statement is eligible for processing. The STEPCODE parameter can be used to test the result of all executed steps, whereas JOBCODE tests only the result of the terminating step.

Note: When specifying the STEPCODE keyword values, you must use the formats of the system abend code, user abend code, and job return code described in Setting error codes.

Abend codes can also be specified in generic form. Therefore, an asterisk (*) can represent any character, or any group of characters, in those positions where it is placed. Only the first character of the abend code must be necessarily specified, any asterisk must follow that character. A code can contain more than one asterisk only if each one is separated by another character.

If ERRSTEP is specified, the STEPCODE values are tested only against the return codes of the steps specified in the ERRSTEP parameter. If no ERRSTEP parameter is specified, the STEPCODE value is tested against the return codes of all executed and flushed steps.

A return code cannot be greater than 4095. To specify all return codes greater than or equal to a certain value, set x to that value and y to 4095.

When using this parameter, all steps in the JCL should have a name; these names should be unique within the job or started task.

HCL Workload Automation for Z treats the first step that abended as the terminating one. The JOBCODE values are tested against this step. With COND=EVEN specified on the EXEC statement, steps that follow an abending step might still be executed. So you can use the STEPCODE parameter to test for an abend in such a step.

Default: Return codes from steps other than the terminating one do not cause automatic recovery. The return code from the terminating step is handled as described for the JOBCODE parameter.

TIME
The time is specified in the form hhmm, where hh is the hour from 00 to 24, and mm is the minute from 00 to 60. This is the time when the recovery is automatic.
For example:
TIME=0700-1600
No recovery actions occurs between 4 p.m. and 7 a.m.
TIME=2200-0800
HCL Workload Automation for Z does automatic recovery only between 22.00 and 8.00.
TIME=0000-2400
Recovery can be automatic at any time.
TIME=0000-0000
Recovery is not started unless there is manual intervention.

The recovery actions for a job or started task that remains in the ended-in-error list can be manually started up later. (See Recovery actions from the Modifying Current Plan panel.) Such requests override any TIME value specified.

Default: The recovery specification is for the time range specified by the STARTIME and ENDTIME keywords of the AROPTS statement.