Prepare COBOL programs

 

Notes to users

  1. 32 bit COBOL copy books are installed in the following directory:
    /opt/mqm/inc/cobcpy32
    and symbolic links are created in:
    /opt/mqm/inc

  2. 64 bit COBOL copy books are installed in the following directory:

    /opt/mqm/inc/cobcpy64

  3. In the following examples set COBCPY to:
    /opt/mqm/inc/cobcpy32
    for 32 bit applications, and:
    /opt/mqm/inc/cobcpy64
    for 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 COBOL

Compiling 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 COBOL
where amqsput is a sample program

Ensure 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

 

Parent topic:

Building your application on HP-UX


fg16310_