When you want to write comments in your CL procedures or add comments to commands in your procedures, use the character pairs /* and */. The comment is written between these symbols.
The starting comment delimiter, /*, requires three characters unless the /* characters appear in the first two positions of the command string. In the latter situation, /* can be used without a following blank before a command.
You can enter the three-character starting comment delimiters in any of the following ways (b represents a blank):
/*b b/* /**
Therefore, the starting comment delimiter can be entered four ways. The starting comment delimiter, /*, can:
For example, in the following procedure, comments are written to describe possible user responses to a set of menu options:
PGM /* ORD040C Order dept general menu */
DCLF FILE(ORD040CD)
START: SNDRCVF RCDFMT(MENU)
IF (&RESP=1) THEN(CALL CUS210)
/*Customer inquiry */
ELSE +
IF (&RESP=2) THEN(CALL ITM210)
/**Item inquiry */
ELSE +
IF (&RESP=3) THEN(CALL CUS210)
/* Customer name search */
ELSE +
IF (&RESP=4) THEN(CALL ORD215)
/** Orders by cust */
ELSE +
IF (&RESP=5) THEN(CALL ORD220)
/* Existing order */
ELSE +
IF (&RESP=6) THEN(CALL ORD410C)
/** Order entry */
ELSE +
IF (&RESP=7) THEN(RETURN)
GOTO START
ENDPGM
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.