Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

cobol(1) OSS Shell and Utilities Reference Manual
7. The command
cobol -Wnobind -Wsql="catalog \$abc.def" xyz
invokes the NonStop SQL/MP compiler, sqlcomp, on program le xyz without going
through the binding process. In addition to the input lename xyz, the catalog option is
passed to the NonStop SQL/MP compiler.
8. The command
cobol -o testprog -L . -L /usr/test/lib testprog.cbl -l tdm
compiles the COBOL85 language source program testprog.cbl and binds the object
le with the library specied in the -l operand. It also binds the object le with a shared
runtime library, if found. If a shared runtime library is not found, it uses the standard C
runtime library. The Binder produces a program le named testprog. By default,
dynamic linking is selected. cobol searches for the library specied by the -l ags and
the -l tdm operand in the following order and selects the rst one found:
libtdm.so in the current directory (-L .)
libtdm.a in the current directory (-L .)
libtdm.so in /usr/test/lib (-L /usr/test/lib)
libtdm.a in /usr/test/lib (-L /usr/test/lib)
libtdm.so in /lib (by default)
libtdm.a in /lib (by default)
libtdm.so in /nonnative/usr/lib (by default)
libtdm.a in /nonnative/usr/lib (by default)
libtdm.so in /usr/lib (by default)
libtdm.a in /usr/lib (by default)
libtdm.so in /usr/local/lib (by default)
libtdm.a in /usr/local/lib (by default)
EXIT VALUES
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
DIAGNOSTICS
If cobol encounters a compilation error that causes an object le to not be created, it writes a
diagnostic message to standard error and continues to compile other source code operands.
However, it does not perform program binding and returns a nonzero exit status. If the binding is
unsuccessful, cobol writes a diagnostic message to standard error and returns a nonzero exit
status.
258 Hewlett-Packard Company 527188-004