
JMCL Parameters Condition Checking and Branching
Chapter 9. Job Management Control Language 9-7
Condition Checking and Branching
The GOTO facility allows you to bypass JCL statements without deleting them or changing
them to comments before you submit the job. Condition checking, with the IF parameter,
allows you to check whether certain conditions exist before you branch to a new part of the
job.
GOTO supports unconditional branching and conditional branching when used in conjunction
with the JMCL IF parameter. Use GOTO for unconditional branching when you are restarting
a job.
GOTO only branches forward in a job. GOTO cannot branch back to an earlier statement.
Mark the destination of the branch with the JMCL NAME parameter. If you bypass SYSIPT
data during the branch, you must also use the DATA parameter. See "NAME" and "DATA"
below.
If you are restarting a job, you may need to use the TYPRUN=RESTART parameter. Please
note that if the step you execute in the restart checks for a condition code, that code may be
invalid at restart time.
GOTO is valid on OPTION and JMCL statements.
GOTO=
label
label specifies the NAME label to branch to. The value must match the label specified on
the NAME parameter (see below). If you specify GOTO=JOBEND, GOTO branches to end-
of-job (/&) and a NAME parameter is not required.
* JMCL GOTO=SORT3
Use NAME to mark the destination of a GOTO branch. Place the NAME statement
immediately before the statement at which you want to resume processing.
NAME is valid on JMCL statements and EXEC statements.
NAME=
label
label specifies a label name. The value specified here must match the label specified on the
GOTO parameter.
* JMCL NAME=SORT3
Description
GOTO
Syntax
Example
NAME
Syntax
Example
Comentarios a estos manuales