Information
Newer version of documentation BMC provides a newer version of the documentation for this version of the product. As a result, BMC no longer accepts comments in this space.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see bao8301.

Example—MQI CONN


This example highlights connecting the EXEC to the queue manager CSQ1.

/* REXX */
"IMFEXEC MQI CONN NAME(CSQ1)" /* Connect to the queue manager */
IMFMQI_OD_OBJECTNAME = TEST.QUEUE1 /* Set queue name        */
'IMFEXEC MQI OPEN OOPTS(MQOO_OUTPUT)' /* Open the queue */
IMFMQI_PMO_OPTIONS = 'MQPMO_SYNCPOINT' /* Set Put options*/
PUTDATA = 'MQPUT001 - TEST DATA ECB = MQPUTECB1 POST CODE = PUTECB1'
'IMFEXEC MQI PUT BUFFER(PUTDATA)'          /* Put message on queue */
'IMFEXEC MQI CMIT'                 /* Commit the work */
'IMFEXEC MQI CLOSE COPTS(MQCO_NONE)' /* Close the queue */
'IMFEXEC MQI DISC'      /* Disconnect from queue manager */
EXIT

The following list describes the variable values that are used or set by this command:

  • Variable IMFHCONN contains the connection handle name.
  • Variable IMFMQCC and IMFCC contain the completion code.
  • Variable IMFMQRC and IMFRC contain the reason code.
  • Variable IMFHOBJ contains the object handle for the queue.
  • Variable IMFMQI_REASON contains the constant (character) reason code.

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Automation 8.3