The mqAddInquiry call is used to add an inquiry command to a bag. The call is specifically for administration purposes, so it can be used with administration bags only. It lets you specify the selectors of attributes on which you want to inquire from WebSphere MQ.
For a full description of the mqAddInquiry call, see mqAddInquiry.
When using the MQAI to inquire about the attributes of WebSphere MQ objects, you can control the data that is returned to your program in two ways.
mqAddInteger(inputbag, MQIA_Q_TYPE, MQQT_LOCAL)This example specifies that the queue type (Selector) must be local (ItemValue) and this specification must match the attributes of the object (in this case, a queue) about which you are inquiring.
Other attributes that can be filtered correspond to the PCF Inquire* commands that can be found in part 1 of this book. For example, to inquire about the attributes of a channel, see the Inquire Channel command in this book. The "Required parameters" and "Optional parameters" of the Inquire Channel command identify the selectors that you can use for filtering.
Here is an example of filtering and querying the attributes of a queue:
/* Request information about all queues */ mqAddString(adminbag, MQCA_Q_NAME, "*") /* Filter attributes so that local queues only are returned */ mqAddInteger(adminbag, MQIA_Q_TYPE, MQQT_LOCAL) /* Query the names and current depths of the local queues */ mqAddInquiry(adminbag, MQCA_Q_NAME) mqAddInquiry(adminbag, MQIA_CURRENT_Q_DEPTH) /* Send inquiry to the command server and wait for reply */ mqExecute(MQCMD_INQUIRE_Q, ...)
For more examples of filtering and querying data items, see Examples of using the MQAI.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csq6927 |