z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF

Rules for coding symbols in JCL

z/OS MVS JCL Reference

Follow these rules when coding symbols in JCL:
  1. Do not code EXEC statement parameter and subparameter keywords as names for JCL symbols.

    Example: Do not code &REGION=200K or REGION=&REGION; correctly code REGION=&SIZE.

  2. 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
    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.

  3. 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.
  4. 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.

  1. 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
  2. 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:
The MVS converter will change that to:
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:
which the command symbolic substitution routine then processes and changes to:

Go to the previous page Go to the next page

Copyright IBM Corporation 1990, 2014