Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

nmcobol(1) OSS Shell and Utilities Reference Manual
-Wx Strips part of the symbol table from the output object le, but keeps information
necessary for the object le to be used as input to the linker utility. This ag is
typically used with the -Wr ag.
Do not include a space before or after the = (equal sign).
Quotation marks around string values in ags are optional but recommended to avoid errors
caused by shell substitutions or deletions.
DESCRIPTION
The nmcobol utility is the interface to the NMCOBOL compilation system; it accepts source code
conforming to the ISO COBOL85 standard. The system consists of an NMCOBOL compiler and
a linker utility (nld or ld), with additional program components supporting SQL preprocessing (the
SCI library for NonStop SQL/MP and mxsqlco for NonStop SQL/MX) and SQL compilation
(sqlcomp for NonStop SQL/MP and mxcmp or mxCompileUserModule for NonStop SQL/MX).
nmcobol performs simple validation of the ags and operands on its command line and, depending
on those items, invokes components of the language compilation system. nmcobol does not verify
the existence of les it passes to compilation system components. It does verify that operand
identies valid les to pass to compilation system components. nmcobol and the components it
runs issue messages to the standard error le.
nmcobol performs the following steps:
1. If the -Wsqlmx ag is specied, invokes the NonStop SQL/MX preprocessor to prepro-
cess any COBOL source les that contain embedded NonStop SQL/MX statements to
create either of the following:
COBOL source les with module denitions (using the release 2 module manage-
ment method)
COBOL-only source les and module denition les (MDFs) (using the release 1
module management method)
2. Compiles any specied COBOL source les or source les produced by Step 1 into object
les.
3. If the -Wmxcmp ag is specied, invokes the NonStop SQL/MX compiler to compile any
module denitions or MDFs.
4. Links the object les together with any libraries specied on the command line. This step
occurs if no ags that prevent linking (such as -c or -Wnolink) are specied and if the
source les are compiled without errors.
5. If the -Wsqlcomp ag is specied, invokes the NonStop SQL/MP compiler to process any
embedded NonStop SQL/MP statements in les created by Step 1 or specied in the com-
mand.
6. Writes an executable object le, dynamic link library (DLL), or shared run-time library
(SRL) specied by the -o ag (if present) or to the le a.out.
The les specied in the operand list are operated on by the appropriate program components of
the compilation system, depending on the command line ags and the type of le operands.
If the -c ag is specied, then for all pathname operands of the form le.cbl, the les $(basename
pathname.c).o are created as the result of successful compilation.
If -c is not specied, the object les created after successful compilation are combined by the link
operation into a program le, dynamic-link library (DLL), or user library. When linking is per-
formed and either the -Wsqlmx or -Wmxcmp ag is specied, the list of libraries searched
664 Hewlett-Packard Company 527188-007