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 file, but keeps information
necessary for the object file to be used as input to the linker utility. This flag is
typically used with the -Wr flag.
Do not include a space before or after the = (equal sign).
Quotation marks around string values in flags 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 flags 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 files it passes to compilation system components. It does verify that operand
identifies valid files to pass to compilation system components. nmcobol and the components it
runs issue messages to the standard error file.
nmcobol performs the following steps:
1. If the -Wsqlmx flag is specified, invokes the NonStop SQL/MX preprocessor to prepro-
cess any COBOL source files that contain embedded NonStop SQL/MX statements to
create either of the following:
• COBOL source files with module definitions (using the release 2 module manage-
ment method)
• COBOL-only source files and module definition files (MDFs) (using the release 1
module management method)
2. Compiles any specified COBOL source files or source files produced by Step 1 into object
files.
3. If the -Wmxcmp flag is specified, invokes the NonStop SQL/MX compiler to compile any
module definitions or MDFs.
4. Links the object files together with any libraries specified on the command line. This step
occurs if no flags that prevent linking (such as -c or -Wnolink) are specified and if the
source files are compiled without errors.
5. If the -Wsqlcomp flag is specified, invokes the NonStop SQL/MP compiler to process any
embedded NonStop SQL/MP statements in files created by Step 1 or specified in the com-
mand.
6. Writes an executable object file, dynamic link library (DLL), or shared run-time library
(SRL) specified by the -o flag (if present) or to the file a.out.
The files specified in the operand list are operated on by the appropriate program components of
the compilation system, depending on the command line flags and the type of file operands.
If the -c flag is specified, then for all pathname operands of the form file.cbl, the files $(basename
pathname.c).o are created as the result of successful compilation.
If -c is not specified, the object files created after successful compilation are combined by the link
operation into a program file, dynamic-link library (DLL), or user library. When linking is per-
formed and either the -Wsqlmx or -Wmxcmp flag is specified, the list of libraries searched
6−64 Hewlett-Packard Company 527188-007