Example—DISPLAY MQI
This example highlights the DISPLAYing of a message to a local queue.
/* REXX */*
'IMFEXEC MQI CONN NAME(CSBD)' /* Connect to the queue manager
IMFMQI_OD_OBJECTNAME = 'JOHNB.QUEUE4' /* Set queue name*/
'IMFEXEC MQI OPEN OOPTS(MQOO_BROWSE)' /* Open the queue*/
IMFMQI_GMO_OPTIONS = 'MQGMO_BROWSE_NEXT' /* Set Get options*/
/* Browse msg on queue*/
'IMFEXEC MQI GET BUFFER(GETDATA)'
'IMFEXEC DISPLAY MQI STRTYPE('IMFMQI_STRUCTURES')
PREFIX(IMFMQI_)'
'IMFEXEC MQI CLOSE COPTS(MQCO_NONE)' /* Close the queue*/
'IMFEXEC MQI DISC' /* Disconnect from queue manager
EXIT
The following describes the variable values that are in effect during the DISPLY processing:
-
Variable IMFHCONN contains the connection handle name.
-
Variable IMFHOBJ contains the object handle for the queue.
-
Variable IMFMQCC and IMFCC contain the completion code.
-
Variable IMFMQRC and IMFRC contain the reason code.
-
Variable IMFMQI_REASON contains the constant (character) reason code.
Comments
Log in or register to comment.