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

Coding symbols in apostrophes

z/OS MVS JCL Reference

You can code symbols in apostrophes on the following keywords:
  • The DD statement AMP parameter
  • The DD statement PATH parameter
  • The DD statement SUBSYS parameter
  • The EXEC statement ACCT parameter
  • The EXEC statement PARM parameter.
When you specify these parameters, the system regards a string beginning with an ampersand (&) inside the apostrophes as a symbol when the following conditions are true:
  • The character following the ampersand is not another ampersand.
  • The characters following the ampersand are ended by a character that is not alphabetic, numeric, or national. The ending character must be not more than 9 characters after the ampersand. The symbol cannot be more than 8 characters long.
  • The string of characters delimited by the & (ampersand) character and the ending character is:
    • Defined as a symbol on a PROC, EXEC, or SET statement
    • A system symbol.

The system treats a string beginning with an ampersand but not meeting these criteria as a literal sequence of characters. Thus the system does not substitute text for symbols and does not issue error messages.

In the following example, &XXX is a JCL symbol that is defined in the STEP2 EXEC statement. &INPUT is not a symbol because it is not defined.
   //      PEND

The ending character for &XXX is the apostrophe.

The result of the example is:
On parameters that are not in the list, the system correctly resolves a symbol that is enclosed in apostrophes when the symbol is immediately preceded by a symbol that is not enclosed in apostrophes. For example, both A and B are substituted correctly in:
   //DD1  DD  &A'&B',DISP=OLD
A symbol within apostrophes cannot be broken at column 71 and continued to the next line. For example, the following JCL statement is incorrect:
//S1          EXEC PGM=IEFBR14,TIME=(30,0),REGION=4K,PARM='Print &SYMB
//             OL'

The JCL symbol SYMBOL is not substituted because it must be coded on a single JCL record. A JCL error may result.

Go to the previous page Go to the next page

Copyright IBM Corporation 1990, 2014