COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
11 Program Compilation
The compiler can run at a high PIN (a process identification number greater than 255) and can
be requested by other processes running at high PINs.
The compiler accepts one source file as input. That source file can use SOURCE directives and
COPY statements to read text from other source files. The source file that is input to the compiler
and the source files from which it reads text can contain one or more source programs, each
consisting of HP COBOL statements, comment lines, and compiler directives (instructions to the
compiler). Compiler directives can also appear on the compiler command line.
Compiler directives specify the source format, control listing features, control selective compilation
of portions of the source code, and request compilation options; therefore, they affect the output
of the compiler. By default, if the source file has no errors, the compiler outputs a listing and an
object file.
The NOLIST and SUPPRESS directives can suppress all or parts of the listing file.
The ECOBOL compiler produces an object file that can either be input to the eld utility or executed.
The SYNTAX directive can suppress all or parts of the object file. Syntax errors in the source file
can also suppress all or parts of the object file:
Compiler produces:Syntax errors are in:
No object fileAll programs in the compilation
No object fileSome programs in the compilation
Complete object fileNo programs in the compilation
The rest of this section applies primarily to the Guardian environment. If you are compiling
HP COBOL programs in the OSS environment, see Chapter 19: Using HP COBOL in the OSS
Environment.
Figure 23 Compiler Input and Output
Compiler Input
Input to the compiler is always a single source file, but that source file can read text from other
source files (using SOURCE directives and COPY statements). The source file that is input to the
compiler and the source files from which it reads text can contain one or more source programs.
One of these source programs can be a main program. The source programs can call each other,
512 Program Compilation










