IBM Extension

*CONTROL (*CBL) Statement

With the *CONTROL (or *CBL) statement, you can selectively display or suppress the listing of source code throughout the source program.

*CONTROL (*CBL) Statement - Format

Read syntax diagramSkip visual syntax diagram*CONTROL*CBLSOURCENOSOURCELIST1NOLIST1MAP1NOMAP1.
Notes:
  • 1 Syntax-checked only.

For a complete discussion of compiler output, see the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide.

The *CONTROL and *CBL statements are synonymous.

The characters *CONTROL or *CBL can start in any column beginning with column 8, followed by at least one space or comma and one or more option keywords. Separate the option keywords with one or more spaces or commas. This statement must be the only statement on the line, and continuation is not allowed. The statement can end with a period.

The options you request are handled in the following manner:
  1. If SOURCE or NOSOURCE appears more than once in a *CONTROL statement, the last occurrence of either option is used.
  2. If a *CONTROL NOSOURCE statement is encountered and SOURCE has been requested as a compiler option, printing of the source listing is suppressed from this point on. An informational message is issued stating that printing of the source has been suppressed.

    Afterwards, you can specify *CONTROL SOURCE to resume the printing of the source listing.

    For more information about compiler options, see the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide.

  3. If *NOSOURCE is requested as a compiler option, output is always inhibited.
  4. The *CONTROL statement is in effect only for the source program in which it is written. It does not remain in effect across batch compilation of a sequence of source programs.
End of IBM Extension