ContentsIndexPreviousNext

2.2.2 Terminal Format

Terminal format is convenient for interactive programming. Lines may be longer or shorter than 80 characters. Tab characters are expanded to every eight spaces. The terminal format divides the source line into four fields as follows:

Indicator Area - column 1. The contents of this area are identical to the contents of the ANSI format area of the same name, with two exceptions. If the conditional debugging indicator "D" is used, it must be preceded by a backslash (\). This places the "D" in column 2. If a normal COBOL line is desired, then the indicator area is eliminated (a space is not used).

Area A - starts immediately after the indicator area (either column 1, 2 or 3). It extends for 4 characters. For a standard source line, Area A starts in column 1.

Area B - starts after Area A, in column 5 or later, and extends to the end of the line or the start of the Identification Area.

Identification Area - starts when a vertical bar ( | ) is encountered that is not part of a literal. It extends to the end of the line. This can be used to introduce in-line comments.

The following sample COBOL text is in terminal format:

* The following paragraph is a sample of terminal
* format. Notice how comments and Area A both start
* in column 1

TEST-PARAGRAPH.
      MOVE SAMPLE-1-VALUE TO SAMPLE-1.
\D    DISPLAY "SAMPLE-1 = ", SAMPLE-1.
      PERFORM EDIT-SAMPLE.