Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CODE clause

Function

The CODE clause specifies a character for identifying the print lines that belong to a specific report. This character is inserted in the first position of each print line of the report but must not be printed. It is used to separate the print lines of two or more reports that are interleaved or written consecutively on the report file.

Format


CODE literal


Syntax rules

  1. The literal must be an alphanumeric literal. The COBOL2000 compiler uses only the first character of the literal for marking the report.

  2. If a report description entry includes the CODE clause, all other report description entries assigned to the same output file (through the REPORT clause) must have a CODE clause also.

  3. The character which is written at the beginning of each print line is associated with the literal.

  4. The character for identifying the print lines of a report is inserted at the beginning of the line, following the carriage control character. This character must not appear in the print format.

General rule

  1. The CODE clause must not be specified if the report is to be printed immediately ("online") or if it is assigned to the report file SYSLST. It must be ensured that reports do not overlap, i.e. that during the time lapse between the INITIATE and TERMINATE statement for one report no GENERATE statement is executed for another report.