SQL Supplement for H-Series RVUs

SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs529446-005
1-28
Running the HP COBOL Compilers
Running the nmcobol Utility in the OSS Environment
The OSS utility nmcobol generates native COBOL programs that run in the OSS
environment of TNS/R systems. The nmcobol utility invokes the native HP COBOL
compiler, NMCOBOL, optionally followed by the linker and SQL compiler. The flags
and the types of files in the operands determine which processes operate on the files
in the operands.
Text file inputs to the compiler can be OSS ASCII text files (code 180) or Guardian
EDIT files (code 101). Embedded SQL/MP source code can be in one of these OSS
file types (identified by the file suffix):
The command syntax for running the NMCOBOL compiler in the OSS environment
follows. The nmcobol utility is case-sensitive. Bracketed items are optional. Put
spaces between flags and their parameters, but do not put spaces on either side of
equal signs.
For detailed information about the nmcobol utility, see the Open System Services
Shell and Utilities Reference Manual.
These examples show how to compile an embedded SQL/MP program by using the
nmcobol utility:
To compile, link, and SQL compile an embedded SQL/MP program, use this type
of command:
nmcobol -o /usr/mydir/myprog -Wsql="WHENEVERLIST" \
-Wsqlcomp="catalog \$vol.subvol" mysrc.cbl
°
The -Wsql flag tells the NMCOBOL compiler to expect embedded SQL in the
source file and passes optional SQL directive options, such as
WHENEVERLIST, to the NMCOBOL compiler. For native-compiled SQL/MP
programs, the SQL directive is not accepted in the source code but is required
on the compiler command line during compilation. For more information, see
.cbl
.cob
COBOL source program to be compiled and optionally linked
.o Object file produced by a previous COBOL compilation to be passed directly to
the linker
.a Archive, typically produced by the ar utility, of nonexecutable linkfiles to be
passed directly to the linker
Note. Embedded SQL/MP programs are disallowed in user libraries, shared run-time libraries
(SRLs), and dynamic-link libraries (DLLs). When compiling embedded SQL/MP programs, do
not use the -Wshared flag, which produces a DLL.
nmcobol [ flag [ flag ]... ] operand ...
Note. To terminate a compilation in the OSS environment, press the Control and c keys
(Ctrl-c) simultaneously.