SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-17
Running HP COBOL Compilers in the OSS
Environment
To change one or more of the defaults before executing the cobol or nmcobol
command, use the export command. The effect of the export command lasts until
you explicitly change the value of the export command.
To execute a cobol or nmcobol command with a specified set of environment
variables, use the OSS env function with the environment variables listed in Table 6-3.
The effect of the env function applies only to the cobol or nmcobol utility command
with which you use it.
For the syntax of the export command and the env function, see the Open System
Services Shell and Utilities Reference Manual.
Running the cobol Utility in the OSS Environment
The OSS utility cobol generates COBOL programs that run in the OSS environment
of TNS or TNS/R systems. The cobol utility invokes the COBOL85, optionally
followed by the Binder, Accelerator, 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 COBOL85 compiler in the OSS environment
follows. The cobol utility is case-sensitive. Bracketed items are optional. Insert spaces
between flags and their parameters, but do not insert spaces on either side of equal
signs.
For detailed information on the cobol 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
cobol utility:
.cbl
.cob
COBOL source program to be compiled and optionally bound
.o Object file produced by a previous COBOL compilation to be directly passed to
the Binder
.a Archive, typically produced by the ar utility of nonexecutable linkfiles to be
directly passed to the Binder
Note. Embedded SQL/MP programs are disallowed in user libraries, shared run-time libraries
(SRLs), and dynamic-link libraries (DLLs).
cobol [ flag [ flag ]... ] operand ...
Note. To terminate a compilation in the OSS environment, press the Control and c keys
(Ctrl-c) simultaneously.