You must compile your COBOL programs using the Micro Focus Cobol compiler for SINIX with the LITLINK directive.
You must ensure that you have specified adequate run-time stack sizes; 16 KB is the recommended minimum.
You need to link your program with one of the following:
Library file | Program/exit type |
---|---|
libmqmcbrt.o | WebSphere MQ COBOL run-time |
libmqmcb.so | server for COBOL |
libmqicb.so | client for COBOL |
Export the following variables:
COBDIR=/usr/opt/lib/cobol export COBDIR COBLIB=$COBDIR/coblib export COBLIB COBCPY=/opt/mqm/inc export COBCPY LD_LIBRARY_PATH=/opt/lib/cobol/coblib export LD_LIBRARY_PATH
To compile a COBOL program like amq0gbr0.cbl on MQSeries for SINIX and DC/OSx, enter:
$ cob -xU -C warning=2 amq0gbr0.cbl -lmqmcb -lmqm \ -lmqmcs -lmqmzse -lmproc
For DC/OSx Version cd087, include -liconv -lresolv on the above command. In the same way, for versions preceding cd087 of DC/OSx, include -liconv.
If you want to use the programs on a machine which only has WebSphere MQ client connections, recompile the programs and link them with the mqicb library instead of the mqmcb library.
If you have DCE, you can link your COBOL batch programs with either DCE threaded libraries or non-DCE threaded libraries.
Notes:
If you do not choose to use DCE threaded libraries, remove /opt/dcelocal/bin from your PATH environment variable before calling the COBOL compiler.
If you do choose to use DCE threaded libraries, export the following:
$ export COBLIBLIST="/opt/lib/cobol/coblib/liblist_r"