Linux Micro Focus COBOL routine compile and link options

The compile and link options for building COBOL routines, such as stored procedures, with the Micro Focus COBOL compiler on Linux® are available in the bldrtn build script.

Compile and link options for bldrtn

Compile and Link options:
cob
The COBOL compiler
$EXTRA_COBOL_FLAG
For 64-bit support, contains the value "-C MFSYNC"; otherwise it contains no value.
-y
Specify to compile to self-contained callable shared object
-o $1
Specify the executable.
$1.cbl
Specify the source file
-L$DB2PATH/$LIB
Specify the location of the Db2® runtime shared libraries.
-ldb2
Link to the Db2 library.
-ldb2gmf
Link to the Db2 exception-handler library for Micro Focus COBOL.

Refer to your compiler documentation for additional compiler options.

Note: After compiling stored procedures, they must be copied or linked into /usr/lib. Editing ld.so.conf is not sufficient.