Prepare COBOL programs
Notes to users
- 32 bit COBOL copy books are installed in the following directory:
/opt/mqm/inc/cobcpy32and symbolic links are created in:/opt/mqm/inc64 bit COBOL copy books are installed in the following directory:
/opt/mqm/inc/cobcpy64- In the following examples set COBCPY to:
/opt/mqm/inc/cobcpy32for 32 bit applications, and:/opt/mqm/inc/cobcpy64for 64 bit applications.
Compile the programs using the Micro Focus compiler. The copy files that declare the structures are in /opt/mqm/inc:
$ export LIB=/usr/mqm/lib:$LIB $ export COBCPY=“<COBCPY>”Compiling 32 bit programs:
$ cob32 -xv amqsput.cbl -L /opt/mqm/lib -lmqmcb Server for COBOL $ cob32 -xv amqsput.cbl -L /opt/mqm/lib -lmqicb Client for COBOL $ cob32 -xtv amqsput.cbl -L /opt/mqm/lib -lmqmcb_r Threaded Server for COBOL $ cob32 -xtv amqsput.cbl -L /opt/mqm/lib -lmqicb_r Threaded Client for COBOLCompiling 64 bit programs:
$ cob64 -xv amqsput.cbl -L /opt/mqm/lib64 -lmqmcb Server for COBOL $ cob64 -xv amqsput.cbl -L /opt/mqm/lib64 -lmqicb Client for COBOL $ cob64 -xtv amqsput.cbl -L /opt/mqm/lib64 -lmqmcb_r Threaded Server for COBOL $ cob64 -xtv amqsput.cbl -L /opt/mqm/lib64 -lmqicb_r Threaded Client for COBOLwhere amqsput is a sample programEnsure that you have specified adequate run-time stack sizes; 16 KB is the recommended minimum.
You need to link your programs with the appropriate library provided by WebSphere MQ. The following table shows which library to use in different environments
Hardware platform Program/exit type Library file PA-RISC Server for COBOL libmqmcb.sl PA-RISC Client for COBOL libmqicb.sl PA-RISC Threaded applications amqmcb_r.sl IA64 (IPF) Server for COBOL libmqmcb.so IA64 (IPF) Client for COBOL libmqicb.so IA64 (IPF) Threaded applications amqmcb_r.so
- Using Micro Focus Server Express with WebSphere MQ on the IA64 (IPF) platform
- Programs to run in the WebSphere MQ client environment
Parent topic:
Building your application on HP-UX
fg16310_