SQL/MX Programming Manual for C and COBOL (H06.04+)

COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL540434-001
16-29
ecobol or nmcobol Utility: Using One Command for
All Compilation Steps
and MP_VOLUME. The OSS shell performs command/parameter substitution and
allows a \ (backslash) to quote special characters such as $.
This example shows how to set MP_SYSTEM and MP_VOLUME as mxcmp
command-line options:
to get MP_SYSTEM=\KINGPIN --> use -d MP_SYSTEM=\\KINGPIN
to get MP_VOLUME=$TX012 --> use -d MP_VOLUME=\$TX012
You must use a pair of backslashes when specifying the value for MP_SYSTEM
and one for MP_VOLUME.
module-definition-file
is the name of the input module definition file (.m) that was generated by the
COBOL preprocessor (mxsqlco).
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-7.
Example—mxcmp
This command compiles the module definition file named sqlprog.m and displays
summary information in addition to error and warning messages. The -e option directs
mxcmp to return warnings rather than errors if tables referenced in the SQL statements
do not exist. The statement also specifies that the module should be placed in a
directory other than the default global directory:
mxcmp -e -v -g moduleLocal="/usr/mydir" 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.