While
an
execute JCL file
is
useful, you need to use the compile
phase of JCL for extra features. These extra features are explained
in
four parts:
• Compilation Description and Terms
• Conditional Decisions
• Substitution Fields
• Combining Files
Compilation
Description
and
Terms
You can compile and/or execute any JCL file using the DO library
command. If your JCL file contains only execution comments,
commands, or execution macros, then you can completely skip the
compile phase (using
the"
="
control character with the DO
command).
If,
however, your JCL file contains "tokens" or labels, or must make
logical decisions, then you must compile the file before executing
it.
The compile phase reads
in
the JCL file line by line, checking for
directly executable lines, keyboard responses, and execution macros.
The compile phase also evaluates any compilation statements and
writes
a/l resultant lines to a file called SYSTEM/JCL. After the
compile phase completes, control is normally passed to the execution
phase, which executes the SYSTEM/JCL file.
As stated earlier, the JCL works by substituting lines
in
a file for
keyboard entries. However, when you compile a JCL file, it can
contain more than just a series of executable commands. (After the
compile phase is completed, however, the SYSTEM/JCL file
does
contain only executable lines.)
You can include the following statements
in
a JCL file you intend to
compile:
• Directly executable commands (DIR, BASIC, etc.)
• Pre-arranged keyboard responses
• JCL execution macros (listed
in
Table
1)
• JCL conditional macros (listed
in
Table 2)
• Labels
• Another JCL file. When a JCL file "calls" another JCL file,
TRSDOS transfers control to the called file and doesn't return
control to the calling file.
We use several terms when discussing JCL compilation. They are:
1.
Token
A token is a string of up to 8 alphanumeric characters. You can
use both upper and lower case letters. Note: There is NO
difference between upper and lower case letters for any
JCL
macro, token, or label.
A-13