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-37
nmcobol Examples With Module Definition Files
nmcobol Examples With Module Definition Files
Figure 16-4 shows how the nmcobol utility compiles a COBOL program with module
definition files.
These commands preprocess, compile, link, and SQL compile a single COBOL
source file:
nmcobol -Wsqlmx -Wsqlmxadd=-x -Wmxcmp -o sqlprog.exe \
sqlprog.ecob sqlprog.m
The nmcobol utility invokes the preprocessor, mxsqlco, which uses the file
sqlprog.ecob as input and produces two files: sqlprog.cbl and sqlprog.m.
Figure 16-4. nmcobol Generating Module Definition Files
nmcobol utility
vst154R.vsd
COBOL and SQL
Source File
COBOL and SQL
Source File
SQL/MX
COBOL Preprocessor
(mxsqlco)
SQL Module
Definition File
SQL Module
Definition File
SQL/MX Compiler
(mxcmp)
SQL/MX Module
SQL/MX Module
COBOL Annotated
Source File
COBOL Annotated
Source File
COBOL Compiler
Linker
(nld)
Executable With CLI