|
|||||
|
||||||
Related Topics | Other Library Functions |
function |
mq-backout |
define external function mq-backout connection value mq-connection connection
Argument definitions
Use mq-backout to roll back an active IBM MQSeries unit of work.
You must include the following line at the beginning of your OmniMark program:
include "ommqi.xin"
The connection object must be connected (else external exception OMMQI0011).
This function corresponds to the MQBACK function in the MQSeries API.
The CompCode and Reason parameters of MQBACK are integrated into the OMMQI error handling.
Add a message to a queue as part of a transaction, and then back it out so no-one can get it.
local mq-connection a-connection local mq-object a-object local stream od-fields variable local mq-object-descriptor a-mqod local stream md-fields variable local mq-message-descriptor a-mqmd local stream pmo-fields variable local mq-put-message-options a-mqpmo ; Connect to queue manger set a-connection to mq-connect set new od-fields {"ObjectName"} to "default" mq-set-object-descriptor a-mqod to od-fields ; Open queue set a-object to mq-open connection a-connection object-descriptor a-mqod options MQOO_OUTPUT ; Initialize structure for putting message. Specify we want to start ; a unit of work set new pmo-fields {"Options"} to "d" % (MQPMO_NEW_MSG_ID union MQPMO_NEW_CORREL_ID union MQPMO_SYNCPOINT) mq-set-put-message-options a-mqpmo to pmo-fields set new md-fields {"Format"} to MQFMT_STRING mq-set-message-descriptor a-mqmd to md-fields ; Put message in the queue mq-put object a-object message-descriptor a-mqmd put-options a-mqpmo message "This is a test message." ; Backout the message so nobody can get it mq-backout object a-object
Related Topics |
Other Library Functions |
Copyright © Stilo International plc, 1988-2010.