Inserting comments in a statement
You can specify comments by inserting lines that start
with /*
and terminate with */
Comments can use multiple lines, or be included anywhere within a statement. Unless the comment is started at column 1, the comment start must be preceded by at least one blank character between it, and the text it follows. For example:
/* -----------------------------------------------+
| This is a multi line comment |
+------------------------------------------------*/
COMMAND RESOURCE KEYWORD(VAL) /* TAIL COMMENT
*/
COMMAND RESOURCE /* EMBEDDED COMMENT */ KEYWORD(/*)
/* in the KEYWORD(/*)
is not preceded
by a space, it is treated as the value for the keyword not as the
start of a comment.JSSTART ADID('CRITBATCH ') IA(0805121738) OPNO(001)
JSJCL DLM(-END-OF-INPUT-TEXT-) /* Stop JCL
//*>OPC SCAN
//*>OPC TABLE NAME=TESTVAR
//* Y */
-END-OF-INPUT-TEXT-
Because the DLM keyword indicates the following line is text it is contradictory to the open comment leading into the text. Text data in Workload Automation Programming Language is treated as unprocessed input, so any comments within the text are passed into the object it is defining. So in this case the open comment will lead to a syntax error.
JSSTART ADID('CRITBATCH ') IA(0805121738) OPNO(001)
JSJCL MEMBER(MYJOB) /* DLM(-END-OF-INPUT-TEXT-)
//*>OPC SCAN
//*>OPC TABLE NAME=TESTVAR
//* Y
-END-OF-INPUT-TEXT- */
/*
within one of
your statements with a preceding space, then you must alter the comment
start character using the OPTIONS COMSTART
statement
and similarly with OPTIONS COMEND
to use something
other than */
to end a comment. Consider that
changing the default comment characters can affect the use of predefined
members such as EQQFLALL, which contains many comments in the /*
*/
format.The /*
value can be included within
a statement, provided that is not preceded by a blank character.
JCLVVAR VARNAME(OK) DEFAULT('/*') SETUP(N)
JCLVVAR VARNAME(NOTOK) DEFAULT(' /*') SETUP(N)