This file contains three labels. To select any procedure, specify the
label on the DO command line.
The following rules determine how much of a labeled JCL file is
included
in
the compile phase:
1)
If
no label
is
specified on the DO command line, all lines from the
beginning of the file up to the first label are compiled.
2) If a label is specified, compiling includes all lines from the specified
label until the next label or the end of the file is reached.
DOing the TEST/JCL file using the @FIRST label would write the
comment".
this is the first procedure" and the IIEXIT macro to the
SYSTEM/JCL file for execution. Specifying either of the other labels
would include only the appropriate single comment line.
If you compiled the file without specifying a label
in
the DO command,
only the initial execution
comment".
TEST/JCL label example" would
be written
in
SYSTEM/JCL.
There is no limit to the size of a labeled procedure. They can range
from one to as many lines as you can fit on your disk. The only
requirement is that a JCL file containing labels must be compiled.
When you use labels
in
a JCL file, we recommend that you start the
file with a comment line or some executable line other than a label.
Suppose @FIRST is the first line
in
the following file:
@FIRST
•
Print
this
comment
If you issued a DO command for this file without specifying the
@FIRST label, the compiling phase would receive the first line, see
that it is a label, and quit. Since the compile is complete, the
SYSTEM/JCL file would be executed! And since nothing was written
to SYSTEM/JCL, its old contents are not erased.
In
other words,
whatever lines had been compiled to the SYSTEM/JCL file from a
previous DO command would now be executed.
Advanced
JCL
Compiling
The previous section on JCL compiling described the basic uses of
tokens and compilation macros. If you do not understand the
JCL
Compiling section, please re-read
it.
If you actually type
in
and try the
examples, you will get a better understanding of how to structure a
JCL
file for compiling.
This section describes additional features and shows different ways to
accomplish logical decision branching. These additional features are
explained
in
four parts:
A-25