Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
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 file
with the library specified in the -l operand. It also links the object file 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 file named testprog.
By default, dynamic linking is selected. ecobol searches directories for the library tdm
specified by the -l flag in the following order and selects the first 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 file. The
preprocessor creates the file sqlprog.cbl. The file 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 file
sqlprog.cbl to create the file sqlprog.o.
c. If no errors occurred in Step b, the NonStop SQL/MX compiler is invoked to pro-
cess the module definitions.
d. If no errors occurred in Step c, eld is invoked to link the file sqlprog.o with the
standard COBOL library and produces the executable file sqlprog.exe.
8. The command
ecobol -c -Wsqlmx file1.ecob file2.ecob file3.ecob
preprocesses the three specified files and also compiles them, but does not link the result-
ing object files. Using the release 2 module management method, if no errors are detected
during either preprocessing or compilation, the following files are created: file1.cob,
3−40 Hewlett-Packard Company 527188-003