+

Search Tips | Advanced Search

Putting and receiving data bags using the MQAI

Data can also be sent between applications by putting and getting data bags using the mqPutBag and mqGetBag calls. This lets the IBM MQ Administration Interface (MQAI) handle the buffer rather than the application.

The mqPutBag call converts the contents of the specified bag into a PCF message and sends the message to the specified queue and the mqGetBag call removes the message from the specified queue and converts it back into a data bag. Therefore, the mqPutBag call is the equivalent of the mqBagToBuffer call followed by MQPUT, and the mqGetBag is the equivalent of the MQGET call followed by mqBufferToBag.

For more information on sending and receiving PCF messages in a specific queue, see Sending and receiving PCF messages in a specified queue

Note: If you choose to use the mqGetBag call, the PCF details within the message must be correct; if they are not, an appropriate error results and the PCF message is not returned.