AIX Micro Focus COBOL routine compile and link options

The compile and link options for building COBOL routines with the Micro Focus COBOL for AIX compiler are available in the bldrtn build script. Note that the Db2® MicroFocus COBOL include files are found by setting up the COBCPY environment variable, so no -I flag is required in the compile step. Refer to the bldapp script for an example.

Compile and link options for bldrtn

Compile options:
cob
The MicroFocus COBOL compiler.
-c
Perform compile only; no link. Compile and link are separate steps.
$EXTRA_COBOL_FLAG="-C MFSYNC"
Enables 64-bit support.
-x
Compile to an object module when used with the -c option.
Link options:
cob
Use the compiler as a front-end for the linker.
-x
Produce a shared library.
-o $1
Specify the executable program.
$1.o
Specify the program object file.
-L$DB2PATH/$LIB
Specify the location of the Db2 runtime shared libraries. For example: $HOME/sqllib/lib32.
-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.