ACUCOBOL-GT supports two different source formats:
- ANSI format
- Terminal format
ANSI format has the following characteristics:
- Columns 1 - 6 are used for sequence numbers. This area is ignored by the compiler.
- Column 7 is the indicator area.
- Columns 8 - 11 are area A.
- Columns 12 - 72 are area B.
- Columns 73 - 80 are the identification area. This area is ignored by the Compiler (but see Source Code Control below).
- Lines are 80 characters long. Lines shorter than 80 characters are padded with spaces, and longer lines are truncated.
Terminal format is convenient for developing programs interactively. This format has the following characteristics:
- The sequence number area is eliminated.
- The indicator area is in column 1. All of the usual COBOL indicators are accepted here except for the conditional debugging
line indicator
D. This indicator must be preceded by a backslash (\) in column 1 (placing the
D in column 2).
- Area A also starts in column 1 unless an indicator is present, in which case it starts immediately after the indicator character.
- Area B starts in column 5 and extends to the end of the line.
- The identification area starts when a
| or
*> is encountered, provided it is not part of a literal. The Identification Area extends to the end of the line. This can be
used to introduce in-line comments.
- The line ends when a carriage-return or new-line is found. Lines may be longer or shorter than 80 characters.
Note: Although the Compiler accepts lines longer than 80 characters, the runtime debugger does not display characters past the
80th column. If possible, use the AcuBench runtime debugger in such cases.
ACUCOBOL-GT Terminal format is compatible with the VAX COBOL terminal source format, except for the introduction of the identification
area, which VAX COBOL does not support. ACUCOBOL-GT Terminal mode is also compatible with ICOBOL terminal source format except
that area A must start in column 1 (in ICOBOL area A may start in column 2).
Both formats expand tab characters to every eight spaces. Both formats also translate lower-case characters to upper-case
except in literals. Finally, both formats translate the underscore character to a hyphen when it is found in identifiers.
Normally, the Compiler determines the source format automatically by examining the first character of the first non-blank
line. If this character is blank or a digit, the file is assumed to be an ANSI file; otherwise it is assumed to be in terminal
format. This is done independently for the main source file and all COPY libraries. This allows mixing of formats among a
source file and its COPY libraries. If desired, the format to use for the entire input source can be set to either mode via
the
-Sa or
-St compile flags.