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


Coding symbols in comments

z/OS MVS JCL Reference
SA23-1385-00

The system does not process symbols in comment statements or in comment fields of JCL statements. Comments on JCL statements that contain symbols are evaluated as follows:
  • In the original submitted JCL, the system recognizes the beginning of the comment field when it encounters the blank character at the end of the parameter field. For purposes of symbolic substitution, the system disregards text occurring after this blank.
  • After performing symbolic substitution, the system re-evaluates the resulting equivalent JCL to determine where the parameter field ends. The system recognizes the beginning of the comment field in the substituted JCL when it encounters the blank character at the end of the (potentially modified) parameter field. The system disregards text occurring after this blank in subsequent processing.
Example:
   //     SET  QUOTE=''''
   //S1   EXEC PGM=IEFBR14,PARM=&QUOTE.ABC   DEF&QUOTE
   //DD1  DD   DUMMY
The equivalent JCL produced by substitution is
   //S1   EXEC PGM=IEFBR14,PARM='ABC   DEF&QUOTE
   //DD1  DD   DUMMY

DEF&QUOTE is considered a comment because it follows the blank that ends the parameter field, so the second instance of &QUOTE will not be replaced during symbolic substitution. Because the first &QUOTE symbol resolves to a single quotation mark, the system expects to either find another single quotation at the end of a subparameter list, or find a continuation to the next line. The EXEC statement receives an error message indicating that the system did not receive an expected continuation.

Example:
   //    SET  CONT='  ',T='(30,0)'
   //S1  EXEC PGM=IEFBR14&CONT,PARM='ABC  DEF',TIME=&T
The equivalent JCL is:
   //S1  EXEC PGM=IEFBR14  PARM='ABC  DEF',TIME=(30,0)

The text (30,0) is substituted for the symbol &T. However, because substitution introduced a blank character after the program name parameter, all text following the blank is considered to be a comment. Thus the system does not process the PARM and TIME parameters.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014