Building the server environment for Windows (32-bit)
Building the server environment for IBM MQ for Windows (32-bit).
About this task
Note: Change the fields identified as VARIABLES in the following, to the directory paths:
Table 1. Fields to change to directory paths Field Directory path MQMDIR The directory path specified when IBM MQ was installed, for example g:\Program Files\IBM\MQ. TUXDIR The directory path specified when TUXEDO was installed, for example f:\tuxedo. APPDIR The directory path to be used for the sample application, for example f:\tuxedo\apps\mqapp. Note: Change the machine name MachineName, and the directory paths, to match your installation. Also change the queue manager name MYQUEUEMANAGER to the name of the queue manager to connect to. Figure 1. Example of ubbstxcn.cfg file for IBM MQ for Windows *RESOURCES IPCKEY 99999 UID 0 GID 0 MAXACCESSERS 20 MAXSERVERS 20 MAXSERVICES 50 MASTER SITE1 MODEL SHM LDBAL N *MACHINES MachineName LMID=SITE1 TUXDIR="f:\tuxedo" APPDIR="f:\tuxedo\apps\mqapp;g:\Program Files\IBM\WebSphere MQ\bin" ENVFILE="f:\tuxedo\apps\mqapp\amqstxen.env" TUXCONFIG="f:\tuxedo\apps\mqapp\tuxconfig" ULOGPFX="f:\tuxedo\apps\mqapp\ULOG" TLOGDEVICE="f:\tuxedo\apps\mqapp\TLOG" TLOGNAME=TLOG TYPE="i386NT" UID=0 GID=0 *GROUPS GROUP1 LMID=SITE1 GRPNO=1 TMSNAME=MQXA OPENINFO="MQSERIES_XA_RMI:MYQUEUEMANAGER" *SERVERS DEFAULT: CLOPT="-A -- -m MYQUEUEMANAGER" MQSERV1 SRVGRP=GROUP1 SRVID=1 MQSERV2 SRVGRP=GROUP1 SRVID=2 *SERVICES MPUT1 MGET1 MPUT2 MGET2The sample ubbconfig file for IBM MQ for Windows is listed in Figure 1. It is supplied as ubbstxcn.cfg in the IBM MQ samples directory.
The sample makefile (see Figure 2) supplied for IBM MQ for Windows is called ubbstxmn.mak, and is held in the IBM MQ samples directory.Figure 2. Sample TUXEDO makefile for IBM MQ for Windows TUXDIR = f:\tuxedo MQMDIR = g:\Program Files\IBM\WebSphere MQ APPDIR = f:\tuxedo\apps\mqapp MQMLIB = $(MQMDIR)\tools\lib MQMINC = $(MQMDIR)\tools\c\include MQMSAMP = $(MQMDIR)\tools\c\samples INC = -f "-I$(MQMINC) -I$(APPDIR)" DBG = -f "/Zi" amqstx.exe: $(TUXDIR)\bin\mkfldhdr -d$(APPDIR) $(MQMSAMP)\amqstxvx.fld $(TUXDIR)\bin\viewc -d$(APPDIR) $(MQMSAMP)\amqstxvx.v $(TUXDIR)\bin\buildtms -o MQXA -r MQSERIES_XA_RMI $(TUXDIR)\bin\buildserver -o MQSERV1 -f $(MQMSAMP)\amqstxsx.c \ -f $(MQMLIB)\mqm.lib -v $(INC) $(DBG) \ -r MQSERIES_XA_RMI \ -s MPUT1:MPUT -s MGET1:MGET $(TUXDIR)\bin\buildserver -o MQSERV2 -f $(MQMSAMP)\amqstxsx.c \ -f $(MQMLIB)\mqm.lib -v $(INC) $(DBG) \ -r MQSERIES_XA_RMI \ -s MPUT2:MPUT -s MGET2:MGET $(TUXDIR)\bin\buildclient -o doputs -f $(MQMSAMP)\amqstxpx.c \ -f $(MQMLIB)\mqm.lib -v $(INC) $(DBG) $(TUXDIR)\bin\buildclient -o dogets -f $(MQMSAMP)\amqstxgx.c \ -f $(MQMLIB)\mqm.lib $(INC) -v $(DBG) $(TUXDIR)\bin\tmloadcf -y $(APPDIR)\ubbstxcn.cfgTo build the server environment and samples, complete the following steps.
Procedure
- Create an application directory in which to build the sample application, for example:
f:\tuxedo\apps\mqapp- Copy the following sample files from the IBM MQ sample directory to the application directory:
- amqstxmn.mak
- amqstxen.env
- ubbstxcn.cfg
- Edit each of these files to set the directory names and directory paths used on your installation.
- Edit ubbstxcn.cfg (see Figure 1) to add details of the machine name and the queue manager to connect to.
- Add the following line to the TUXEDO file TUXDIRudataobj\rm:
MQSERIES_XA_RMI;MQRMIXASwitchDynamic;MQMDIR\tools\lib\mqmxa.lib MQMDIR\tools\lib\mqm.libThe new entry must be one line in the file.- Set the following environment variables:
TUXDIR=TUXDIR TUXCONFIG=APPDIR\tuxconfig FIELDTBLS=MQMDIR\tools\c\samples\amqstxvx.fld LANG=C- Create a TLOG device for TUXEDO. To do this, invoke tmadmin -c, and enter the following command:
crdl -z APPDIR\TLOG- Set the current directory to APPDIR, and invoke the sample makefile amqstxmn.mak as an external project makefile. For example, with Microsoft Visual C++ , issue the following command:
msvc amqstxmn.makSelect build to build all the sample programs.