JCL rebuild parameters

When a recovery statement is selected, HCL Workload Automation for Z uses these parameters to build the JCL stream that is used to restart the operation.
DELSTEP
DELSTEP specifies job or started-task steps to be deleted if the RECOVER statement is activated. Only one step of each name is deleted, so ensure that all your step names are unique.
Note:
  1. Steps within in-stream procedures and started tasks cannot be deleted.
  2. IF-THEN-ELSE-ENDIF construct statements are recognized. IF-THEN-ELSE-ENDIF statements are deleted when a sequence of delete lines, one or more steps as specified by DELSTEP, contains both the IF-THEN statement and the matching ENDIF statement, and possibly an ELSE statement. IF-THEN-ELSE-ENDIF statements which have their counterparts outside the delete sequence are kept.

    The delete sequence begins with an EXEC statement and continues to the line immediately before the EXEC statement of the next step to be retained in the JCL record. However, IF-THEN-ELSE-ENDIF statements immediately preceding this delete sequence are taken into account. That is, statements separated from the delete sequence by comment statements or subsequent IF-THEN-ELSE-ENDIF statements. In this sequence of lines preceding the delete sequence IF-THEN statements are converted to comment lines if the delete sequence contains the matching ELSE and/or ENDIF statements.

    In the delete sequence IF-THEN-ELSE-ENDIF statements are retained if the matching statement is not within the immediately preceding lines or not in the delete sequence. If an ELSE and the matching ENDIF is found but the corresponding IF-THEN statement is not, then only the ELSE statement is deleted, or converted to a comment statement. The ENDIF is retained for the IF statement in a preceding section of the JCL.

    To summarize the IF-THEN-ELSE-ENDIF handling:
    • IF-THEN statements might be changed to comment statements by inserting *> in columns 3 and 4. This is done when the IF-ENDIF is in front of a sequence of JCL lines to be deleted and the matching ENDIF is within the delete sequence.
    • Statements are left in the JCL when required because the matching statements are not available in the sequence of JCL lines to be deleted.
    There is no check that the result is a valid job. The result is not valid if all steps are deleted between an IF-THEN statement and a corresponding ELSE statement. The result is also not valid if an IF-THEN statement remaining in the JCL references the name of a step to be deleted.
Default: No steps are deleted.
ADDPROC
This parameter specifies the names of JCL procedures to include in the JCL if recovery occurs. The JCL procedure library members are in the procedure library with ddname EQQPRLIB.
Note: This is not a JES procedure library but an internal procedure library specific to HCL Workload Automation for Z.

The added JCL is placed after the RECOVER statements in the JCL in the order the names appear in the ADDPROC parameter. This makes it necessary to have the RECOVER statements after in-stream procedures in the JCL file.

A useful technique is to have any procedures you want to add included in the JCL. The JCL is then invoked by including an EXEC statement, which calls the procedure. The EXEC statement itself is within a procedure invoked by ADDPROC. This reduces the risk of calling a procedure that is not available in EQQPRLIB.

Note: If you include an in-stream procedure, remember that it must always begin with a PROC statement and end with a PEND statement.

Default: No JCL is added.

RESSTEP
For a job, this specifies a value for the RESTART parameter on the JOB statement of the failing job.

For a started task, a COND=ONLY parameter is added to all EXEC statements that precede the specified step. If a COND parameter already exists in a step, it is commented out before the COND=ONLY is added.

The value of the RESSTEP parameter is enclosed in parentheses and is used either as the RESTART parameter or as the first step that COND=ONLY is not added to. If the JOB statement already contains a RESTART value, it is replaced by the RESSTEP value. However, if RESTART=Y is not specified in the recovery statement, RESSTEP is not active, meaning that the job is not rerun. If the restart step name is within a JCL procedure, specify stepname.procstepname.
* (asterisk)
Specifies that the job or started task should be restarted at the first step (possibly a step of a cataloged procedure).
% (percent)
Specifies that the job or started task should be restarted at the failing step. Deciding which step of an operation has failed describes which step is selected if more than one step has failed, and also if the error cannot be associated with a particular step.

If % is specified, make sure that all steps in the in-stream JCL have a unique name. Do not specify % for a started task if the JCL file includes procedure calls.

A checkpoint ID can also be specified. The SYSCHK DD statement must then be present in the step JCL. The checkpoint name must not contain special characters, such as commas, blanks, or parentheses.

Default: The JOB statement is unchanged.

CALLEXIT
The CALLEXIT parameter specifies an exit routine to be called if this RECOVER statement is activated. The exit is called for each JCL line, and the exit can decide to accept the line without any changes, modify it, insert one or several JCL lines, or delete it. The exit also has the option of stopping the restart and recovery of the failing job or started task.

For more details, see Customization and Tuning.

Default: No exit is called.