+

Search Tips | Advanced Search

Compiling the Reference Message Exit sample

To compile the Reference Message Exit sample, use the command for the platform on which IBM MQ is installed.

MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

To compile amqsxrma, use the following commands:


On AIX

xlc_r -q64 -e MsgExit -bE:amqsxrm.exp -bM:SRE -o amqsxrm_64_r
-I MQ_INSTALLATION_PATH/inc -L MQ_INSTALLATION_PATH/lib64 -lmqm_r amqsqrma.c


On IBM i

CRTCMOD MODULE(MYLIB/AMQSXRMA) SRCFILE(QMQMSAMP/QCSRC)
TERASPACE(*YES *TSIFC)
Note:
  1. To create your module so that it uses the IFS file system, add the option SYSIFCOPT(*IFSIO)
  2. To create the program for use with non-threaded channels use the following command: CRTPGM PGM(MYLIB/AMQSXRMA) BNDSRVPGM(QMQM/LIBMQM)
  3. To create the program for use with threaded channels use the following command: CRTPGM PGM(MYLIB/AMQSXRMA) BNDSRVPGM(QMQM/LIBMQM_R)


On Linux

$ gcc -m64 -shared -fPIC -o /var/mqm/exits64/amqsxrma amqsqrma.c -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib64 -Wl,-rpath= MQ_INSTALLATION_PATH/lib64 -Wl,-rpath=/usr/lib64 -lmqm_r


On Windows

IBM MQ now supplies the mqm library with client packages as well as server packages, so the following example uses mqm.lib instead of mqmvx.lib:
cl amqsqrma.c /link /out:amqsxrm.dll /dll mqm.lib mqm.lib /def:amqsxrm.def
Parent topic: Design of the Reference Message Exit sample (amqsxrma.c, AMQSXRM4)


Related concepts

Last updated: 2020-10-04