This describes how to write comments in CL procedures.
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) SELECT WHEN (&RESP=1) THEN(CALL CUS210) /* CUSTOMER INQUIRY */ WHEN (&RESP=2) THEN(CALL ITM210) /* ITEM INQUIRY */ WHEN (&RESP=3) THEN(CALL CUS210) /* CUSTOMER NAME SEARCH */ WHEN (&RESP=4) THEN(CALL ORD215) /* ORDERS BY CUST */ WHEN (&RESP=5) THEN(CALL ORD220) /* EXISTING ORDER */ WHEN (&RESP=6) THEN(CALL ORD410C) /* ORDER ENTRY */ WHEN (&RESP=7) THEN(RETURN) ENDSELECT GOTO START ENDPGM