[UNIX, Linux, Windows, IBM i]

Creating switch load files

IBM® MQ comes with a sample makefile, used to build switch load files for the supported database managers.

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

The sample makefile, together with all the associated C source files required to build the switch load files, is installed in the following directories:
  • For IBM MQ for Windows, in the MQ_INSTALLATION_PATH\tools\c\samples\xatm\ directory
  • For IBM MQ for UNIX and Linux® systems, in the MQ_INSTALLATION_PATH/samp/xatm/ directory
The sample targets used to build the switch load files are:
  • For Db2®, db2swit.
  • For Oracle, oraswit
  • For Informix®, infswit
  • For Sybase, sybswit

[Windows]The generated switch file is placed in C:\Program Files\IBM\MQ\exits.

[UNIX][Linux]If you have 32-bit queue managers then the sample make file, xaswit.mak, installs a 32-bit switch load file in /var/mqm/exits.

[UNIX][Linux]If you have 64-bit queue managers then the sample make file, xaswit.mak, installs a 32-bit switch load file in /var/mqm/exits, and a 64-bit switch load file in /var/mqm/exits64.

[UNIX][Linux]If your system does not support 32-bit compilation, use the 64-bit only target for your database:
  • For Db2, db2swit64
  • For Oracle, oraswit64
  • For Informix, infswit64
  • For Sybase, sybswit64

File security

It is possible that your operating system might fail the loading of the switch load file by IBM MQ, for reasons outside the control of IBM MQ. If this occurs, error messages are written to the IBM MQ error logs, and potentially the MQBEGIN call can fail. To help to ensure that your operating system does not fail the loading of the switch load file, you must fulfil the following requirements:
  1. The switch load file must be available in the location that is given in the qm.ini file.
  2. The switch load file must be accessible to all processes that need to load it, including the queue manager processes and application processes.
  3. All of the libraries upon which the switch load file depends, including the libraries that are provided by the database product, must be present and accessible.