Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (m - o) nmcobol(1)
7. The command
nmcobol -Wsqlmx -Wmxcmp -o sqlprog.exe sqlprog.ecbl sqlprog.m
when using the release 1 module management method, processes the single COBOL
module named sqlprog.ecbl containing embedded NonStop SQL/MX statements as fol-
lows:
a. The NonStop SQL/MX preprocessor is invoked to process the source le. The
preprocessor creates the les sqlprog.cbl and sqlprog.m. The le sqlprog.cbl is
the COBOL-only equivalent of sqlprog.ecbl; that is, the preprocessor translates
all embedded NonStop SQL/MX statements to the appropriate COBOL code. The
le sqlprog.m is the corresponding module denition le.
b. If no errors occurred in Step a, the NMCOBOL compiler processes the le
sqlprog.cbl to create the le sqlprog.o.
c. If no errors occurred in Step b, the NonStop SQL/MX compiler is invoked to pro-
cess the module denition le sqlprog.m.
d. If no errors occurred in Step c, nld is invoked to link the le sqlprog.o with the
standard COBOL library and produces the executable le sqlprog.exe.
8. The command
nmcobol -Wmxcmp -Wmxcmp_files="test1.m,test1.o"
SQL-compiles the MDF le test1.m using the NonStop SQL/MX mxcmp compiler and
processes the le test1.o using the NonStop SQL/MX mxCompileUserModule without
also linking it.
9. The command
nmcobol -c -Wsqlmx file1.ecob file2.ecob file3.ecob
preprocesses the three specied les and also compiles them, but does not link the result-
ing object les. If no errors are detected during either preprocessing or compilation, the
following les are created: le1.m, le1.cob, le2.m, le2.cob, le3.m, le3.cob, le1.o,
le2.o, and le3.o.
10. The command
nmcobol -c -Wsqlmx file1.cbl file2.ecbl file3.ecob file4.cob
mixes COBOL source les with and without embedded NonStop SQL/MX statements.
All les are compiled but not linked. When using the release 1 module management
method, if no errors are detected during either preprocessing or compilation, the following
les are created: le2.m, le2.cob, le3.m, le3.cob, le1.o, le2.o, le3.o, le4.o.
DIAGNOSTICS
If nmcobol encounters a compilation error that prevents an object le from being created, it writes
a diagnostic message to the standard error le and continues to compile other source code
operands; however, it does not perform program linking and returns a nonzero exit status. If the
linking is unsuccessful, nmcobol writes a diagnostic message to the standard error le and returns
a nonzero exit status.
527188-004 Hewlett-Packard Company 669