/* (Comments)

Enter comments in your program. To code comments in the Identification Division, see REM.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax: for Format 1, code anywhere in your program

 /*     commentline

Syntax: for Format 2, code in the Procedure Division only

        /*commentline

Syntax: for Format 3, code in the Procedure Division only

program-code /*comment

Syntax: for Format 4, code in Customizer rules

%* comment

Syntax: for Format 5, code in the Data Structure Editor only

* comment
/* comment
%* comment

Comments:

  • Comment lines do not affect the function of a program or data structure. In the Program Painter, the last keyword entered before your comment line(s) is still in effect.
  • You cannot code comments within database calls, user interface calls, or Data Structure Editor constructs.
  • Do not use evaluation brackets in Formats 2, 3, and 4.
  • Begin each comment line with /* or %*.
  • In the Procedure Division, you can code /* anywhere in the column 12 - 72 area.
  • A Customizer comment (Format 4) can start in any column, as long as it is on a line by itself and is indented (we recommend four spaces) underneath the Customizer statement.

Examples:

In the Program Painter:

002000         /* S-COBOL COMMENT LINE
002010  /*     COBOL COMMENT LINE
002020  PARA   MAIN-PARA   /* S-COBOL COMMENT

In the Data Structure Editor:

-LINE- -------- Data Structure Editor -------
000001         /* WORK FIELD 1 RECORD
000002         WRK1-FIELD-1    X(5)
000003             88 OPEN-VAL   V'OPEN'
000004             88 CLOSED-VAL V'CLOSE'

Generated COBOL code:

000001  */* WORK FIELD 1 RECORD
000002   01  WRK1-FIELD-1    PIC X(5).
000003       88  OPEN-VAL    VALUE 'OPEN'.
000004       88  CLOSED-VAL  VALUE 'CLOSE'.