Coding symbols in JCL
JCL symbols and system symbols can represent parameters, subparameters, or values in procedures or in the parameter field of statements; those that vary each time a job runs are good candidates to be coded as symbols.
You can code JCL symbols in:
- JCL statements in the input job stream, submitted either in batch mode or from a TSO session (but not in the job stream read in response to a START command)
- Statements in cataloged or in-stream procedures (which do not include started task JCL)
- DD statements that are added to a procedure (something that is possible, but not practical for a started task procedure).
You can code system symbols in started task JCL and batch job JCL (jobs and procedures), which can be read only from a procedure library. Therefore, you can code system symbols only in statements in cataloged procedures.
Symbolic parameters are not permitted in place of the ''*'' or ''DATA'' positional parameters on SYSIN type DD statements. SYSIN DD statements do not necessarily have SYSIN as the ddname. See SYSIN DD statement for a description of the SYSIN DD statement.
For example, if the data set name on a DD statement in an INCLUDE
group can vary each time the INCLUDE group is imbedded in the JCL,
you can code the DSNAME parameter as a system symbol on the DD
statement:
DSNAME=&DAY
If a job step is charged to different account numbers each time
the procedure is executed, code the ACCT parameter on the EXEC statement
as one or more system symbols or JCL symbols:
ACCT=&ALLNOS
ACCT=&FIRST&SECOND&THIRD
- For information about using symbols in nested procedures, see Using symbols in nested procedures.
- For information about using symbols in started task JCL, see Using symbols in started task JCL.
- For information about using symbols in batch job JCL, see Using symbols in batch JCL.