The Message Queue Interface consists of the following:
WebSphere MQ for z/OS also supplies:
WebSphere MQ for iSeries also supplies:
MQSeries for OS/2 Warp, WebSphere MQ for Windows, MQSeries for Compaq OpenVMS Alpha, and WebSphere MQ on UNIX systems also supply:
MQSeries for Compaq NonStop Kernel also supplies:
MQSeries for VSE/ESA also supplies:
The calls in the MQI can be grouped as follows:
The MQI calls are described fully in WebSphere MQ Application Programming Reference.
Syncpoint calls are available as follows:
WebSphere MQ for z/OS provides the MQCMIT and MQBACK calls. Use these calls in z/OS batch programs to tell the queue manager that all the MQGET and MQPUT operations since the last syncpoint are to be made permanent (committed) or are to be backed out. To commit and back out changes in other environments:
For backward compatibility, the CSQBCMT and CSQBBAK calls are available as synonyms for MQCMIT and MQBACK. These are described fully in WebSphere MQ Application Programming Reference.
WebSphere MQ for iSeries provides the MQCMIT and MQBACK commands. You can also use the OS/400 COMMIT and ROLLBACK commands, or any other commands or calls that initiate the OS/400 commitment control facilities (for example, EXEC CICS SYNCPOINT).
The default SYNCPOINT option for the MQPUT and MQGET calls is SYNCPOINT, rather than NO_SYNCPOINT. To use the default (SYNCPOINT) option for MQPUT, MQGET and MQPUT1 operations, the application must have an active TM/MP Transaction that defines the unit of work to be committed.
Use CICS commands such as EXEC CICS SYNCPOINT and EXEC CICS SYNCPOINT ROLLBACK. The batch interface and server support the MQCMIT and MQBACK calls which are translated into the CICS commands EXEC CICS SYNCPOINT and EXEC CICS SYNCPOINT ROLLBACK respectively. Use these calls in programs to tell the queue manager that all the MQGET and MQPUT operations since the last syncpoint are to be made permanent (committed) or are to be backed out.
The following products provide the MQCMIT and MQBACK calls:
Use syncpoint calls in programs to tell the queue manager that all the MQGET and MQPUT operations since the last syncpoint are to be made permanent (committed) or are to be backed out. To commit and back out changes in the CICS environment, use commands such as EXEC CICS SYNCPOINT and EXEC CICS SYNCPOINT ROLLBACK.
The MQXCNVC - convert characters call converts message character data from one character set to another. Except on WebSphere MQ for z/OS, this call is used only from a data-conversion exit.
See the WebSphere MQ Application Programming Reference manual for the syntax used with the MQXCNVC call, and Chapter 11, Writing data-conversion exits for guidance on writing and invoking data conversion exits.
Structures, used with the MQI calls listed in Calls, are supplied in data definition files for each of the supported programming languages. WebSphere MQ for z/OS and WebSphere MQ for iSeries supply files that contain constants for you to use when filling in some of the fields of these structures. For more information on these, see WebSphere MQ data definitions.
All the structures are described fully in the WebSphere MQ Application Programming Reference.
For the C language, the MQI provides the following elementary data types or
unstructured fields:
MQBYTE | A single byte of data |
MQBYTEn | A string of 16, 24, 32, 40, or 64 bytes |
MQCHAR | One single-byte character |
MQCHARn | A string of 4, 8, 12, 16, 20, 28, 32, 48, 64, 128, or 256 single-byte characters |
MQHCONN | A connection handle (Hconn) (this data is 32 bits long) |
MQHOBJ | An object handle (Hobj) (this data is 32 bits long) |
MQLONG | A 32-bit signed binary integer |
PMQLONG | A pointer to data of type MQLONG |
These data types are described fully in WebSphere MQ Application Programming Reference.
Table 1 shows the Visual Basic(R) equivalents of the C
elementary data types.
Table 1. Visual Basic equivalents of the C elementary data types
C data type | Visual Basic data type |
---|---|
MQBYTE | String * 1 |
MQBYTEn | String * n |
MQCHAR | String * 1 |
MQCHARn | String * n |
MQHCONN | Long |
MQHOBJ | Long |
MQLONG | Long |
PMQLONG | No equivalent |
For COBOL, assembler, PL/I, or RPG, use the equivalent declarations shown in the relevant native language manual.
WebSphere MQ for z/OS supplies data definitions in the form of COBOL copy files, assembler-language macros, a single PL/I include file, a single C language include file, and C++ language include files.
WebSphere MQ for iSeries supplies data definitions in the form of COBOL copy files, RPG copy files, C language include files, and C++ language include files.
MQSeries for VSE/ESA supplies data definitions in the form of a C language include file, COBOL copy files, and PL/I include files.
The data definition files supplied with WebSphere MQ contain:
For a full description of WebSphere MQ data definition files, see Appendix F, WebSphere MQ data definition files.
The stub programs and library files provided are listed here, for each platform.
For more information about how to use stub programs and library files when you build an executable application, see Part 3, Building a WebSphere MQ application. For information about linking to C++ library files, see WebSphere MQ Using C++.
Before you can run a program written with WebSphere MQ for z/OS, you must link-edit it to the stub program supplied with WebSphere MQ for z/OS for the environment in which you are running the application. The stub program provides the first stage of the processing of your calls into requests that WebSphere MQ for z/OS can process.
WebSphere MQ for z/OS supplies the following stub programs:
CSQBSTUB | Stub program for z/OS batch programs |
CSQBRRSI | Stub program for z/OS batch programs using RRS via the MQI |
CSQBRSTB | Stub program for z/OS batch programs using RRS directly |
CSQCSTUB | Stub program for CICS programs |
CSQQSTUB | Stub program for IMS programs |
CSQXSTUB | Stub program for distributed queuing non-CICS exits |
CSQASTUB | Stub program for data-conversion exits |
Alternatively, you can dynamically call the stub from within your program. This technique is described in Dynamically calling the WebSphere MQ stub.
In IMS, you may also need to use a special language interface module that is supplied by WebSphere MQ.
In WebSphere MQ for iSeries, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system.
For non-threaded applications:
AMQZSTUB | Server service program provided for compatibilty with releases before V5R1M0 |
AMQVSTUB | Data conversion service program provided for compatibility with releases before V5R1M0 |
LIBMQM | Server service program |
LIBMQIC | Client service program |
IMQB23I4 | C++ base service program |
IMQS23I4 | C++ server service program |
LIBMQMZF | Installable exits for C |
In a threaded application:
LIBMQM_R | Server service program |
IMQB23I4_R | C++ base service program |
IMQS23I4_R | C++ server service program |
LIBMQMZF_R | Installable exits for C |
If you are using WebSphere MQ for iSeries you can write your applications in C++. To see how to link your C++ applications, and for full details of all aspects of using C++, see WebSphere MQ Using C++.
In MQSeries for OS/2 Warp, you must link your program to the MQI library
files supplied for the environment in which you are running your application,
in addition to those provided by the operating system:
MQM.LIB | Server for 32-bit C |
MQIC.LIB | Client for C |
MQMXA.LIB | Static XA interface for C |
MQMCICS.LIB | CICS for OS/2 V2 exits for C |
MQMCICS3.LIB | CICS Transaction Server for OS/2, V4 exits |
MQMZF.LIB | Installable services exits for C |
MQICCB16.LIB | Client for 16-bit Micro Focus COBOL |
MQMCB16.LIB | Server for 16-bit Micro Focus COBOL |
MQMCBB.LIB | Server for 32-bit IBM VisualAge(R) COBOL |
MQMCB32.LIB | Server for 32-bit Micro Focus COBOL |
MQICCBB.LIB | Client for 32-bit IBM VisualAge COBOL |
MQICCB32.LIB | Client for 32-bit Micro Focus COBOL |
IMQ*.LIB | Server for C++ |
In WebSphere MQ for Windows, you must link your program to the MQI library
files supplied for the environment in which you are running your application,
in addition to those provided by the operating system:
MQM.LIB | Server for 32-bit C |
MQIC.LIB | Client for 16-bit C |
MQIC32.LIB | Client for 32-bit C |
MQMXA.LIB | Static XA interface for C |
MQMCICS.LIB | CICS for Windows NT V2 exits for C |
MQMCICS4.LIB | TXSeries for Windows NT, V4 exits for C |
MQMZF.LIB | Installable services exits for C |
MQMCBB.LIB | Server for 32-bit IBM COBOL |
MQMCB32 | Server for 32-bit Micro Focus COBOL |
MQICCBB.LIB | Client for 32-bit IBM COBOL |
MQICCB32 | Client for 32-bit Micro Focus COBOL |
IMQ*.LIB | Server for C++ |
MQMENC.LIB | Dynamic XA interface in C for Encina |
MQMTUX.LIB | Dynamic XA interface in C for Tuxedo |
In WebSphere MQ for AIX, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system.
In a non-threaded application:
libmqm.a | Server for C |
libmqic.a | Client for C |
libmqmzf.a | Installable service exits for C |
libmqmxa.a | XA interface for C |
libmqmcbrt.o | WebSphere MQ run-time library for Micro Focus COBOL support |
libmqmcb.a | Server for COBOL |
libmqicb.a | Client for COBOL |
libimqc23ia.a | Client for C++ |
libimqs23ia.a | Server for C++ |
In a threaded application:
libmqm_r.a | Server for C |
libmqic_r.a | Client for C |
libmqmzf_r.a | Installable service exits for C |
libmqmxa_r.a | XA interface for C |
libimqc23ia_r.a | Client for C++ |
libimqs23ia_r.a | Server for C++ |
libmqmxa_r.a | For Encina |
In MQSeries for AT&T GIS UNIX, you must link your program to the MQI
library files supplied for the environment in which you are running your
application, in addition to those provided by the operating system.
libmqm.so | Server for C |
libmqmzse.so | For C |
libmqic.so | Client for C |
libmqmcs.so | Client for C |
libmqmzf.so | Installable service exits for C |
libmqmxa.a | XA interface for C |
In MQSeries for Compaq OpenVMS Alpha, you must link your program to the MQI
library files supplied for the environment in which you are running your
application, in addition to those provided by the operating system:
mqm.exe | Server for C |
mqic.exe | Client for C |
mqmzf.exe | Installable service exits for C |
mqmxa.exe | XA interface for C |
mqcbrt.exe | WebSphere MQ COBOL run-time |
mqmcb.exe | Server for COBOL |
mqicb.exe | Client for COBOL |
In MQSeries for Compaq Tru64 UNIX, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system. The files listed are for DIGITAL UNIX Version 4.0D or Version 4.0E, and Compaq Tru64 UNIX Version 4.0F or Version 5.0, except where stated.
In a non-threaded application on V4.0 or any application
on V5.0:
libmqm.so | Server for C |
libmqic.so | Client for C |
libimqs23ff.so | Server for C++ |
libimqc23ff.so | Client for C++ |
libmqmcb.so | Server for COBOL |
libmqmicb.so | Client for COBOL |
libmqmzf.so | Installable service exits (not Compaq Tru64 UNIX Version 5.0) |
In a threaded application on V4.0:
libmqm_r.so | Server for C |
libmqic_r.so | Client for C |
libimqs23ff_r.so | Server for C++ |
libimqc23ff_r.so | Client for C++ |
libmqmcb_r.so | COBOL |
libmqmzf.so | Installable service exits (not Compaq Tru64 UNIX Version 5.0) |
In WebSphere MQ for HP-UX, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system.
In a non-threaded application:
libmqm.sl | Server for C |
libmqic.sl | Client for C |
libmqmzf.sl | Installable service exits for C |
libmqmxa.sl | XA interface for C |
libimqi23ah.sl | C++ |
libmqmcbrt.o | WebSphere MQ run-time library for Micro Focus COBOL support |
libmqmcb.sl | Server for COBOL |
libmqicb.sl | Client for COBOL |
In a threaded application:
libmqm_r.sl | Server for C |
libmqmzf_r.sl | Installable service exits for C |
libmqmxa_r.sl | XA interface for C |
libimqi23ah_r.sl | C++ |
In WebSphere MQ for Linux for Intel and Linux for zSeries, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system.
In a non-threaded application:
libmqm.so | Server for C |
libmqic.so | Client for C |
libmqmzf.so | Installable service exits for C |
libmqmxa.so | XA interface for C |
libimqc23gl.so | Client for C++ |
libimqs23gl.so | Server for C++ |
In a threaded application:
libmqm_r.so | Server for C |
libmqic_r.so | Client for C |
libmqmzf_r.so | Installable service exits for C |
libmqmxa_r.so | XA interface for C |
libimqc23gl_r.so | Client for C++ |
libimqs23gl_r.so | Server for C++ |
In MQSeries for SINIX and DC/OSx, you must link your program to the MQI library files supplied for the environment in which you are running your application, in addition to those provided by the operating system.
In a non-threaded application:
libmqm.so | Server for C |
libmqmzse.so | For C |
libmqic.so | Client for C |
libmqmcs.so | Client for C |
libmqmzf.so | Installable service exits for C |
libmqmxa.a | XA interface for C |
libmqmcbrt.o | WebSphere MQ COBOL run-time |
libmqmcb.so | Server for COBOL |
libmqicb.so | Client for COBOL |
In a threaded application:
libmqm_r.so | For C |
libmqmcs_r.so | For C |
libmqmcics_r.so | For CICS |
libmqmxa_r.a | For XA interface in C |
In WebSphere MQ for Solaris, you must link your program to the MQI library
files supplied for the environment in which you are running your application
in addition to those provided by the operating system.
libmqm.so | Server for C |
libmqmzse.so | For C |
libmqic.so | Client for C |
libmqmcs.so | Client for C |
libmqmzf.so | Installable service exits for C |
libmqmxa.a | XA interface for C |
libimqc23as.a | Client for C++ |
libimqs23as.a | Server for C++ |
In MQSeries for VSE/ESA you must link your program to the install sublibrary PRD2.MQSERIES (this is its default name). This sublibrary contains all the required object decks.
In MQSeries for Compaq NonStop Kernel, you must link your program to the
MQI library files supplied for the environment in which you are running your
application in addition to those provided by the operating system.
mqmlibc | For C, non-native |
mqmlibt | For TAL or COBOL, non-native |
mqmlibnc | For native C |
mqmlibnt | For native TAL or COBOL |