SQL/MX 3.1 Programming Manual for C and COBOL (H06.23+, J06.12+)

COBOL Program Compilation
HP NonStop SQL/MX Release 3.1 Programming Manual for C and COBOL663854-001
16-32
ecobol or nmcobol Utility: Using One Command for
All Compilation Steps
The static SQL/MX compiler provides backward compatible behavior. If the
SQLMX_PREPROCESSOR_VERSION environment variable is set to 800, mxcmp behaves
just like SQL/MX Release 1.8. Otherwise, mxcmp supports all SQL/MX Release 2.x
features and command-line options. For more information, see Influencing Module
Management Behavior on page 17-9.
Example—mxcmp
The following command compiles the module definition and places module file in the
user specified OSS location, /usr/mymodules:
mxcmp -g moduleLocal=/usr/mymodules sqlprog.m
The following command compiles the module definition and places module file in the
user specified Guardian location, /G/data01/mymod:
mxcmp -g moduleLocal=/G/data01/mymod sqlprog.m
ecobol or nmcobol Utility: Using One
Command for All Compilation Steps
In the OSS environment, the ecobol or nmcobol utility provides the interface to
COBOL compilation components, including the SQL/MX COBOL preprocessor, the
native COBOL compiler, and the native object file linker (eld or nld). ecobol enables
you to perform TNS/E native compilation and build an embedded SQL/MX program in
a single command. On systems running H06.05 or later RVUs, nmcobol enables you
to perform TNS/R native compilation and build an embedded SQL/MX program in a
single command. You can also use the compiler utility options individually: for example,
to run the SQL/MX compiler after preprocessing.
In the Windows environment, ecobol and nmcobol are bundled with ETK. For details
on syntax and use, see the help file Using Command-Line Cross Compilers on
Windows, which is included with ETK. In addition, the Open System Services Shell and
Utilities Reference Manual contains a listing of all ecobol and nmcobol utility options.