Inquiring about the attributes of an object

Use the MQINQ call to inquire about the attributes of any type of IBM® WebSphere® MQ.

As input to this call, you must supply:
  • A connection handle.
  • An object handle.
  • The number of selectors.
  • An array of attribute selectors, each selector having the form MQCA_* or MQIA_*. Each selector represents an attribute with a value that you want to inquire about, and each selector must be valid for the type of object that the object handle represents. You can specify selectors in any order.
  • The number of integer attributes that you are inquiring about. Specify zero if you are not inquiring about integer attributes.
  • The length of the character attributes buffer in CharAttrLength. This must be at least the sum of the lengths required to hold each character attribute string. Specify zero if you are not inquiring about character attributes.
The output from MQINQ is:
  • A set of integer attribute values copied into the array. The number of values is determined by IntAttrCount. If either IntAttrCount or SelectorCount is zero, this parameter is not used.
  • The buffer in which character attributes are returned. The length of the buffer is given by the CharAttrLength parameter. If either CharAttrLength or SelectorCount is zero, this parameter is not used.
  • A completion code. If the completion code gives a warning, this means that the call completed only partially. In this case, examine the reason code.
  • A reason code. There are three partial-completion situations:
    • The selector does not apply to the queue type
    • There is not enough space allowed for integer attributes
    • There is not enough space allowed for character attributes

    If more than one of these situations arise, the first one that applies is returned.

If you open a queue for output or inquire and it resolves to a non-local cluster queue you can only inquire the queue name, queue type, and common attributes. The values of the common attributes are those of the chosen queue if MQOO_BIND_ON_OPEN was used. The values are those of an arbitrary one of the possible cluster queues if either MQOO_BIND_NOT_FIXED or MQOO_BIND_ON_GROUP was used or MQOO_BIND_AS_Q_DEF was used and the DefBind queue attribute was MQBND_BIND_NOT_FIXED. See MQOPEN and clusters and MQOPEN for more information.

Note: The values returned by the call are a snapshot of the selected attributes. The attributes can change before your program acts on the returned values.

There is a description of the MQINQ call in MQINQ.