Preparing COBOL programs in Solaris
Learn about preparing COBOL programs in Solaris.
MQ_INSTALLATION_PATH represents the high-level directory in
which IBM® MQ is installed.
- 32 bit COBOL copy books are installed in the following directory:
and symbolic links are created in:MQ_INSTALLATION_PATH/inc/cobcpy32MQ_INSTALLATION_PATH/inc -
64 bit COBOL copy books are installed in the following directory:
MQ_INSTALLATION_PATH/inc/cobcpy64 - In the following examples set
COBCPYto:
for 32 bit applications, and:MQ_INSTALLATION_PATH/inc/cobcpy32
for 64 bit applications.MQ_INSTALLATION_PATH/inc/cobcpy64
Compile the programs using Micro Focus compiler. The copy files that declare the structures are
in
MQ_INSTALLATION_PATH/inc:-
$ export LIB=MQ_INSTALLATION_PATH/lib:$LIB -
$ export COBCPY=COBCPY_VALUE
$ cob32 -xv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib -lmqmcbServer for COBOL
$ cob32 -xv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib -lmqicbClient for COBOL
$ cob32 -xtv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib -lmqmcb_rThreaded Server for COBOL
$ cob32 -xtv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib -lmqicb_rThreaded Client for COBOL
$ cob64 -xv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib64 -lmqmcbServer for COBOL
$ cob64 -xv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib64 -lmqicbClient for COBOL
$ cob64 -xtv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib64 -lmqmcb_rThreaded Server for COBOL
$ cob64 -xtv amqs0put0.cbl -LMQ_INSTALLATION_PATH/lib64 -lmqicb_rThreaded Client for COBOL
You must link your program with one of the following:
- libmqmcb.so
Server for COBOL
- libmqicb.so
Client for COBOL