Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
cobol(1) OSS Shell and Utilities Reference Manual
4. The command
cobol -o test3 -O 2 -WBstatic x1.cbl x2.o x3.cbl -l mylib
compiles source files x1.cbl and x3.cbl and binds the object files together
with x2.o into program file test3. Static binding has been specified, so the
Binder tries to resolve references using the library mylib.a before using the
standard library libc.a. The -O 2 flag causes optimization during compilation
and invocation of the Accelerator on the program file.
5. The command
cobol -o xyz -Wbind="set heap 64" -Wsql x.o y.o z.o
binds the object files x.o, y.o, and z.o into a program file xyz. The
Binder sets the heap size of the program to 64 pages. The NonStop SQL/MP
compiler, sqlcomp, is then invoked on xyz to compile xyz.
6. The command
cobol -Wnobind -Waxcel xyz
invokes the Accelerator, axcel, on object or program file xyz without going
through the binding process.
7. The command
cobol -Wnobind -Wsql="catalog \$abc.def" xyz
invokes the NonStop SQL/MP compiler, sqlcomp, on program file xyz
without going through the binding process. In addition to the input filename
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 file with the library specified in the -l operand. It also binds the
object file 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 pro-
gram file named testprog. By default, dynamic linking is selected. cobol
searches for the library specified by the -l flags and the -l tdm operand in the
following order and selects the first 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)
2−92 Hewlett-Packard Company 527188-021