SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
16-6
Compiling Embedded SQL COBOL Programs With
Module Definition Files
Compiling Embedded SQL COBOL Programs With Module
Definition Files
Figure 16-2 shows how a COBOL program with separate module definition files is
compiled. The application’s embedded SQL source file is called sqlprog.ecob.
Although this figure shows the individual steps for clarity, you can use the COBOL
compiler utility (nmcobol) or ETK to automate the process. For more information on
using nmcobol in this way, see nmcobol Utility: Using One Command for All
Compilation Steps on page 16-29. For more information on ETK, see ETK online help.
These steps correspond to the steps in Figure 16-2
on page 16-6.
Figure 16-2. Compiling Embedded SQL COBOL Programs With Module
Definition Files
vst152.vsd
SQL/MX Compiler
(mxcmp)
SQL/MX Module
SQL/MX Module
COBOL Compiler
Object File
sqlprog.o
Object
Libraries
Linker
5
6
Application Process
sqlprog.exe
SQL CLI and Executor
8
4
COBOL Program
(executable) File
sqlprog.exe
COBOL Program
(executable) File
sqlprog.exe
COBOL Annotated
Source File
sqlprog.cbl
COBOL Annotated
Source File
sqlprog.cbl
3
SQL Module
Definition File
sqlprog.m
SQL Module
Definition File
sqlprog.m
3
SQL/MX
COBOL Preprocessor
(mxsqlco)
2
SQL/MX
COBOL Source
File
sqlprog.ecob
SQL/MX
COBOL Source
File
sqlprog.ecob
1
7
9