Adding WebSphere MQ Calls to Your ACUCOBOL-GT Program

In order to interface with IBM WebSphere MQ, your ACUCOBOL-GT program must be able to connect to the queue manager, open specific queues, read messages from queues, write messages to queues, close queues, and disconnect from the queue manager. Once the WebSphere MQ Client software is loaded and configured, you can set up a queue on the message queue manager or server to receive messages. We support calls to the message queues and the message queue manager.

Once they are defined, the queue manager and queue names are case sensitive.

The runtime uses the following WebSphere MQ calls to communicate with other WebSphere MQ applications by sending and receiving messages:

Connection Calls

MQCONN - Connect to queue manager

MQCONNX - Connect to queue manager (extended)

MQDISC - Disconnect queue manager

Queue Manipulation Calls

MQOPEN - Open object (usually a queue)

MQCLOSE - Close Object

MQINQ - Inquire about an object

MQGET - Get a message off of the queue

MQPUT - Put a message on the queue

MQPUT1 - Open, put single message, close in one call

MQSET - Set object attributes

Transaction Support

MQBEGIN - Begin Unit of work

MQBACK - Back out changes

MQCMIT - Commit changes

These routines can be called directly from COBOL, as shown in the subsequent sections. Please note that for Windows-based applications, it is not necessary to use the parameter qualifiers "BY VALUE" or "BY REFERENCE" if the runtime is configured to load the WebSphere MQ DLL automatically. However, if you load the DLL manually, or if you are operating under UNIX or Linux, you must use these qualifiers.

For all of these calls, we recommend that you check the COMP-CODE and REASON variables to verify that the calls executed successfully.

For a detailed description of all available commands and their usage, refer to the IBM WebSphere MQ manuals.

See Configuring the Runtime and Environment for details.