Compaq COBOL AAQ2G1FTK User Manual
Page 36
Developing Compaq COBOL Programs
1.1 Compaq COBOL and Alpha Architecture System Resources
1.1.2.3 Improving Compile Performance with Separate Compilation (OpenVMS)
The /SEPARATE_COMPILATION qualifier can improve compile-time performance
for large source files that are made up of multiple separately compiled programs
(SCPs). For programs compiled without this qualifier, the compiler engine parses
the entire compilation unit and uses system resources (sized for the total job) for
the duration of this compilation. When you use the /SEPARATE_COMPILATION
qualifier, the compilation is replaced by a smaller series of operations, and
memory structures that are needed for individual procedures are reclaimed and
recycled. See Section 1.3.2.4 for additional information.
♦
1.1.3 Choosing a Reference Format
You need to choose a reference format before you set out to write a Compaq
COBOL program, and you must be aware of the format at compile time. The
Compaq COBOL compiler accepts source code written in either terminal or ANSI
reference format. You cannot mix reference formats in the same source file.
On OpenVMS, when copying text from Oracle CDD/Repository, the Compaq
COBOL compiler translates the record descriptions into the reference format of
the source program.
♦
1.1.3.1 Terminal Reference Format
Compaq recommends using terminal format, a Compaq optional format, when
you create source files from interactive terminals. The compiler accepts terminal
format as the default reference format.
Terminal format eliminates the line number and identification fields of ANSI
format and allows horizontal tab characters and short lines. Terminal format
saves disk space and decreases compile time. It is easier to edit source code
written in terminal format.
The following table shows the structure and content of a terminal reference
source line:
Character Positions
Contents
1 to 4
Area A
5 to 256
Area B
End of line
Margin R
You can use the Tab key or the space bar to position source entries in a line.
Pressing the Return key signifies the end of a line. Terminal format treats the
end of each line as Margin R. Use a continuation ( - ) character when you want to
continue a line. (This is useful for a quoted literal that is too long for one line.)
If you wish to use a hyphen or continuation dash (-), a comment asterisk (*), or a
skip-to-top-of-page slash (/) character, it must be placed in column 1. If you wish
to use conditional compilation characters, they must be placed in columns 1 and
2. For more information about using conditional compilation characters and the
Tab key, see the Compaq COBOL Reference Manual.
1–6 Developing Compaq COBOL Programs