Synopsis
stepstart job step name{ [,skip (cc{ <| = |> }code [, {jobend|job step name}])] | [,{even|only|every}]}
Description
This statement signifies the start of a job step. The step from this control statement to the next specified stepend control statement is considered to be a single job step.
Using the completion code of the relevant job step, the job step that is to be executed next can be specified.
A maximum number of 186 job steps can be defined in a single JCL file.
Operands
job step name
Specify the job step name.
The job step name can be specified with up to 16 bytes of alphanumeric characters.
skip (cc{<|=|>}code [,{jobend|job step name}])
Specify the next job step to be executed according to the job step completion code. If the condition (cc{<|=|>}code) is met, the control will move to the job step specified in the branching job step ({jobend|job step name}); therefore the job step located next to the job step currently running on JCL will not be executed.
Up to 32 skip statements can be specified simultaneously.
The "cc" indicates the completion code of the current job step, using a fixed character string.
When specifying the "code," use the completion code value with an integer from 0 to 256.
To terminate a job when cc is smaller than code, specify "cc<code"; when they are equal, specify "cc=code"; when cc is greater than code, specify "cc>code."
When the specified conditions are satisfied, specify to which job step the control is transferred, using the step name or fixed character string "jobend."
To terminate a job, specify "jobend" or omit this specification.
If a step name located before the current job step is specified, it will end with an error and the job will not be executed.
The control, when moved to the specified job step, will execute the job steps normally from top to bottom. In this case, the code value will be inherited.
even|only|every
Specify one of "even", "only", or "every."
The job step to which this operand is specified should be specified as the last job step of a job.
If this operand is specified when only a single job step exists, the operand will be ignored.
When "only" is specified:
The current job step will be executed only when an application error has occurred in any of the preceding job steps.
When "even" is specified:
The current job step will be executed regardless of whether the preceding job steps ended abnormally.
However, if forced termination is performed during preceding job execution or request for stopping a service/daemon is issued, the relevant job step will not be executed.
When "every" is specified:
The current job step will always be executed when the job terminates (in all cases of normally, abnormally, and forcibly). But when the service/daemon is not running, the current job step cannot be started. Forced termination cannot be accepted during execution of the current job step. If a service/daemon stop request is received while executing the current job step, the current job step will be halted.
Caution
Abnormal termination of a job with exception code is considered an application error.
Example
The following is an example showing that the current job step "step1" ends with a value greater than 0. The control is moved to the job step named "recovery."
stepstart step1,skip(cc>0,recovery)