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 file. The
preprocessor creates the files sqlprog.cbl and sqlprog.m. The file 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
file sqlprog.m is the corresponding module definition file.
b. If no errors occurred in Step a, the NMCOBOL compiler processes the file
sqlprog.cbl to create the file sqlprog.o.
c. If no errors occurred in Step b, the NonStop SQL/MX compiler is invoked to pro-
cess the module definition file sqlprog.m.
d. If no errors occurred in Step c, nld is invoked to link the file sqlprog.o with the
standard COBOL library and produces the executable file sqlprog.exe.
8. The command
nmcobol -Wmxcmp -Wmxcmp_files="test1.m,test1.o"
SQL-compiles the MDF file test1.m using the NonStop SQL/MX mxcmp compiler and
processes the file 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 specified files and also compiles them, but does not link the result-
ing object files. If no errors are detected during either preprocessing or compilation, the
following files are created: file1.m, file1.cob, file2.m, file2.cob, file3.m, file3.cob, file1.o,
file2.o, and file3.o.
10. The command
nmcobol -c -Wsqlmx file1.cbl file2.ecbl file3.ecob file4.cob
mixes COBOL source files with and without embedded NonStop SQL/MX statements.
All files 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
files are created: file2.m, file2.cob, file3.m, file3.cob, file1.o, file2.o, file3.o, file4.o.
DIAGNOSTICS
If nmcobol encounters a compilation error that prevents an object file from being created, it writes
a diagnostic message to the standard error file 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 file and returns
a nonzero exit status.
527188-004 Hewlett-Packard Company 6−69