SQL/MP Programming Manual for COBOL

HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-1
6 Explicit Program Compilation
This section describes the explicit compilation of an HP COBOL program containing
embedded SQL statements and directives in the Guardian, OSS, and PC host
environments using TNS and TNS/R compilation tools.
Topics include:
Compilation Methods
Preparing for Compilation on page 6-5
Running the HP COBOL Compilers on page 6-12
Binding and Linking on page 6-21
Acceleration of TNS HP COBOL Programs on page 6-23
Running the SQL Compiler on page 6-25
Using CONTROL Directives on page 6-42
Using Compatible Components on page 6-45
Compilation Methods
The HP COBOL compilers translate HP COBOL source programs into machine
language that is specific to a particular NonStop system architecture. Therefore, the
type of HP COBOL compiler that you use to compile your program determines the
NonStop system where you can run the program. For more information, see Table 6-2,
COBOL Compilation Mode and Execution Environment, on page 6-12.
You can compile a source program in TNS mode or native mode on a NonStop system.
A TNS-compiled program uses TNS process and memory architecture and consists of
TNS object code (TNS instructions), whereas a natively compiled program uses native
process and memory architecture and consists of native object code (RISC
instructions). The steps for compiling an embedded SQL/MP program for each
compilation mode are:
TNS Mode Compilation on page 6-2
Native Mode Compilation for TNS/R Systems on page 6-4