Rules for coding symbols in JCL
Follow these rules when coding symbols in JCL:
- Do not code EXEC statement parameter and subparameter keywords
as names for JCL symbols.
Example: Do not code ®ION=200K or REGION=®ION; correctly code REGION=&SIZE.
- Do not code DD or JOB statement keywords as JCL symbols in procedures
or jobs that are started by a START command from the operator console.
This rule includes the following obsolete keywords:
- AFF
- SEP
- SPLIT
- SUBALLOC
- MODE
This rule also includes DCB subparameters. For example, do not use the following DCB subparameters as symbol values:- BFALN
- LRECL
For a complete list of DCB subparameters, see DCB subparameters.
- When coding a JCL symbol that has the same name as a system symbol, keep in mind that the substitution text for the JCL symbol overrides the substitution text for the system symbol with the same name.
- Do not use symbols to change the identifier field, name field, or operation field of a JCL statement.
In addition to the preceding rules for coding symbols in JCL, you also need the general rules for coding system symbols. See the coding system symbols information in z/OS MVS Initialization and Tuning Reference.
Note:
- JCL supports substringing of system symbols but not JCL symbols. You can use substringing to specify a subset of characters in substitution text. For an explanation of substringing symbols, see the substringing symbols information in the general rules for coding symbols in z/OS MVS Initialization and Tuning Reference
- You can also use double ampersand notation in your JCL code. See z/OS MVS Initialization and Tuning Reference for further information.
For instance, suppose you want to enter a substringed symbol
as a parameter of an EXEC statement of a started task. By using a
double ampersand you can force MVS™ to
defer processing the statement until after the JCL is executed and
the program is running. For example, given a value of '05' for SYSCLONE,
the statement could read:
//Step1 EXEC PGM=MVSCMD,PARM='F RMF,S III,MEMBER(3&&SYSCLONE(2:1))'
The MVS converter
will change that to: //Step1 EXEC PGM=MVSCMD,PARM='F RMF,S III,MEMBER(3&SYSCLONE(2:1))'
which
is the JCL that gets executed. Your MVSCMD program would then take
what is in the PARM on its EXEC statement and issue it as an MVS command: F RMF,S III,MEMBER(3&SYSCLONE(2:1))
which
the command symbolic substitution routine then processes and changes
to: F RMF,S III,MEMBER(35)