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

ecobol(1) OSS Shell and Utilities Reference Manual
6. The command
ecobol -o testprog -L . -L /usr/test/lib testprog.cbl -l tdm
compiles the COBOL85 language source program testprog.cbl and links the object le
with the library specied in the -l operand. It also links the object le with a DLL, if
found. If a DLL is not found, it uses the standard C run-time library. The eld utility pro-
duces a program le named testprog.
By default, dynamic linking is selected. ecobol searches directories for the library tdm
specied by the -l ag in the following order and selects the rst copy 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)
7. The command
ecobol -Wsqlmx -Wmxcmp -o sqlprog.exe sqlprog.ecbl
processes the single COBOL module named sqlprog.ecbl containing embedded NonStop
SQL/MX statements using the release 2 compilation method as follows:
a. The NonStop SQL/MX preprocessor is invoked to process the source le. The
preprocessor creates the le sqlprog.cbl. The le sqlprog.cbl is the COBOL-only
equivalent of sqlprog.ecbl; that is, the preprocessor translates all embedded Non-
Stop SQL/MX statements to the appropriate COBOL code.
b. If no errors occurred in Step a, the ECOBOL compiler processes the le
sqlprog.cbl to create the le sqlprog.o.
c. If no errors occurred in Step b, the NonStop SQL/MX compiler is invoked to pro-
cess the module denitions.
d. If no errors occurred in Step c, eld is invoked to link the le sqlprog.o with the
standard COBOL library and produces the executable le sqlprog.exe.
8. The command
ecobol -c -Wsqlmx file1.ecob file2.ecob file3.ecob
preprocesses the three specied les and also compiles them, but does not link the result-
ing object les. Using the release 2 module management method, if no errors are detected
during either preprocessing or compilation, the following les are created: le1.cob,
340 Hewlett-Packard Company 527188-004