SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-30
Running the HP COBOL Compilers
Running the ecobol Utility in the OSS Environment
The OSS utility ecobol generates native COBOL programs that run in the OSS
environment of TNS/E systems. The ecobol utility invokes the native HP COBOL
compiler, ECOBOL, 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 ECOBOL compiler in the OSS environment
follows. The ecobol 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 ecobol 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
ecobol utility:
•
To compile, link, and SQL compile an embedded SQL/MP program, use this type
of command:
ecobol -o /usr/mydir/myprog -Wsql="WHENEVERLIST" \
-Wsqlcomp="catalog \$vol.subvol" mysrc.cbl
°
The -Wsql flag tells the ECOBOL compiler to expect embedded SQL in the
source file and passes optional SQL directive options, such as
WHENEVERLIST, to the ECOBOL 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 dynamic-link libraries (DLLs). When
compiling embedded SQL/MP programs, do not use the -Wshared flag, which produces a
DLL.
ecobol [ flag [ flag ]... ] operand ...
Note. To terminate a compilation in the OSS environment, press the Control and c keys
(Ctrl-c) simultaneously.










