*CONTROL (*CBL) statement
With the *CONTROL (or *CBL) statement, you can selectively display or suppress the listing of source code and storage maps throughout the source text.
For a complete discussion of the output produced by these options, see Getting listings in the COBOL for Linux® on x86 Programming Guide.
For information about specifying whether listings are encoded in UTF-8 or in the code page specified by the compile-time locale, see LSTFILE in the COBOL for Linux on x86 Programming Guide.
The *CONTROL and *CBL statements are synonymous. *CONTROL is accepted anywhere that *CBL is accepted.
The characters *CONTROL or *CBL can start in any column beginning with column 7, followed by at least one space or comma and one or more option keywords. The option keywords must be separated by one or more spaces or commas. This statement must be the only statement on the line, and continuation is not allowed. The statement can be terminated with a period.
The *CONTROL and *CBL statements must be embedded in a program source. For example, in the case of batch applications, the *CONTROL and *CBL statements must be placed between the PROCESS (CBL) statement and the end of the program (or END PROGRAM marker, if specified).
The source line containing the *CONTROL (*CBL) statement will not appear in the source listing.
If an option is defined at installation as a fixed option, that fixed option takes precedence over all of the following parameter and statements:
- PARM (if available)
- CBL statement
- *CONTROL (*CBL) statement
The requested options are handled in the following manner:
- If an option or its negation appears more than once in a *CONTROL statement, the last occurrence of the option word is used.
- If the corresponding option has been requested as a parameter to the compiler, then a *CONTROL statement with the negation of the option word must precede the portions of the source text for which listing output is to be inhibited. Listing output then resumes when a *CONTROL statement with the affirmative option word is encountered.
- If the negation of the corresponding option has been requested as a parameter to the compiler, then that listing is always inhibited.
- The *CONTROL statement is in effect only within the source program in which it is written, including any contained programs. It does not remain in effect across batch compiles of two or more COBOL source programs.