Using MQSeries with NonStop Tuxedo 6.5.3
Step 1: Make parts of MQSeries OSS-friendly
Since NonStop TUXEDO uses the OSS personality to build and execute clients and servers the
easiest thing to do is copy a small subset of MQSeries files into the OSS name space. It’s likely
a build environment could be setup such that the MQSeries files could still reside in the
Guardian name space but that wasn’t attempted.
First copy the header files from the ZMQSLIB subvolume to an OSS directory (e.g., mqsinc)
and make the necessary file name translation. For example, cmqcfch becomes cmqcfc.h. The
sample programs only needed cmqc.h and cmqcfc.h, and neither needed editing.
Next copy or symbolically link the native mode MQSeries library MQMLIBNC to an OSS
directory, say mqslib, and name it mqmlibnc.o. The .o suffix is required because the library
isn’t an archive such as is supplied by NonStop TUXEDO (e.g., libgp.a), but instead is a
relinkable object file. Note, the pax file included in this document has a symbolic link from
mqslib/mqmlibnc.o to the library in the Guardian name space. This link will need to be updated
to point at the appropriate location based on where MQSeries has been installed on the test
system.
Step 2: Include mqmlibnc.o when building NonStop TUXEDO
clients and servers
The MQSeries library file should be treated like any other native .o file. Namely, when building
an MQSeries-only object, the filename is listed like any other object (e.g., "c89 -g -o amqsput
amqsput.o mqmlibnc.o"). When building a NonStop TUXEDO client or server, use the
appropriate utility (i.e., buildclient or buildserver) and include mqmlibnc.o in the -f option. For
example, "buildclient -o mqscl -f "mqscl.o mqmlibnc.o". Note, static linking of clients and
servers wasn’t tested, but should work.
Step 3a: Running a NonStop TUXEDO client that directly
accesses an MQSeries queue
One of the sample programs supplied below acts both as a NonStop TUXEDO client and
accesses an MQSeries queue directly. Of course to function as a NonStop TUXEDO client the
NonStop TUXEDO application must be running. However, if the process will also access an
MQSeries queue then there are two other considerations to keep in mind. One, the userid used
to start the process must be able to both access the NonStop TUXEDO application and access
the MQSeries queue. On the test system this required the userid be a member of the MQM
group, but this may not be required of all installations. Two, ensure all the necessary MQSeries
environment variables are set. The easiest way to do this is to include the variables in the
*MACHINES’ ENVFILE of the NonStop TUXEDO application. This ensures all clients and
servers have the necessary values set once attached to the application. Not doing this caused a