SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
16-21
Running the COBOL Compiler and Linker
This example creates a single-file, annotated output source file that contains an
embedded module definition:
mxsqlco sqlprog.ecob -c sqlprog.cbl \
-g moduleGroup=INVENTORY -g moduleVersion=V2
Running the COBOL Compiler and Linker
The HP NonStop COBOL compilers translate source code into machine language that
is specific to a particular NonStop system architecture. The type of COBOL compiler
that you use to compile your SQL/MX program determines the NonStop system and
environment where you can run the program.
Table 16-1 lists the COBOL compilers, the environments where you can run the
compilers, and the environments where you can run the compiled programs.
On Windows, you can run the COBOL compiler and native object file linker from ETK,
or you can use the command-line cross compiler (nmcobol) and the linker (nld). For
details on syntax and using the COBOL cross compiler with ETK, see the help file
Using Command-Line Cross Compilers on Windows, which is included with ETK.
To run the NMCOBOL compiler, see the COBOL Manual for TNS and TNS/R
Programs. To run the nld linker, see the nld Manual. For more information on the
nmcobol utility, see nmcobol Utility: Using One Command for All Compilation Steps on
page 16-29, the OSS reference pages, or the Open System Services Shell and Utilities
Reference Manual.
Table 16-1. HP NonStop COBOL Compilers for Embedded SQL/MX Programs
Compiler
Compiler Operating
Environment
Program Execution
Environment
TNS/R native compilers:
•
Native COBOL cross
compiler for TNS/R
*
Windows environment on a
PC connected to a NonStop
system running a G-series
RVU
OSS or Guardian
environment on a NonStop
system running a G-series
RVU
•
nmcobol OSS environment on a
NonStop system running a
G-series RVU
OSS or Guardian
environment on a NonStop
system running a G-series
RVU
•
NMCOBOL Guardian environment on a
NonStop system running a
G-series RVU
Guardian or OSS
environment on a NonStop
system running a G-series
RVU
*
The native COBOL cross compilers can be run from the ETK or from the PC command line.