+

Search Tips | Advanced Search

MQINQ (Inquire about object attributes) on IBM i

The MQINQ call returns an array of integers and a set of character strings containing the attributes of an object.

The following types of object are valid:


Syntax

MQINQ (HCONN, HOBJ, SELCNT, SELS, IACNT, INTATR, CALEN, CHRATR, CMPCOD, REASON)


Usage notes

  1. The values returned are a snapshot of the selected attributes. There is no guarantee that the attributes are not changed before the application can act upon the returned values.
  2. When you open a model queue, a dynamic local queue is created. This is true even if you open the model queue to inquire about its attributes. The attributes of the dynamic queue (with certain exceptions) are the same as those of the model queue at the time the dynamic queue is created. If you then use the MQINQ call on this queue, the queue manager returns the attributes of the dynamic queue, and not those of the model queue. See Table 1 for details of which attributes of the model queue are inherited by the dynamic queue.
  3. If the object being inquired is an alias queue, the attribute values returned by the MQINQ call are those of the alias queue, and not those of the base queue to which the alias resolves.
  4. If the object being inquired is a cluster queue, the attributes that can be inquired depend on how the queue is opened:

    • If the cluster queue is opened for inquire plus one or more of input, browse, or set, there must be a local instance of the cluster queue in order for the open to succeed. In this case the attributes that can be inquired are those valid for local queues.
    • If the cluster queue is opened for inquire alone, or inquire and output, only the following attributes can be inquired; the QType attribute has the value QTCLUS in this case:

      • CAQD
      • CAQN
      • IADBND
      • IADPER
      • IADPRI
      • IAIPUT
      • IAQTYP

      If the cluster queue is opened with no fixed binding (that is, OOBNDN specified on the MQOPEN call, or OOBNDQ specified when the DefBind attribute has the value BNDNOT), successive MQINQ calls for the queue might inquire different instances of the cluster queue, although typically all of the instances have the same attribute values.

    For more information about cluster queues, see Configure a queue manager cluster.

  5. If a number of attributes are to be inquired, and then some of them are to be set using the MQSET call, it might be convenient to position at the beginning of the selector arrays the attributes that are to be set, so that the same arrays (with reduced counts) can be used for MQSET.
  6. If more than one of the warning situations arise (see the CMPCOD parameter), the reason code returned is the first one in the following list that applies:
    1. RC2068
    2. RC2022
    3. RC2008
  7. For more information about object attributes, see:

  8. A new local queue SYSTEM.ADMIN.COMMAND.EVENT is used for queuing messages that are generated whenever commands are issued. Messages are put onto this queue for most commands, depending on how the CMDEV queue manager attribute is set:

    • ENABLED - command event messages are generated and put onto the queue for all successful commands.
    • NODISPLAY - command event messages are generated and put onto the queue for all successful commands other than the DISPLAY (MQSC) command, and the Inquire (PCF) command.
    • DISABLED - command event messages are not generated (this is the queue manager's initial default value).


Parameters

The MQINQ call has the following parameters:


RPG Declaration

     C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
     C                     CALLP     MQINQ(HCONN : HOBJ : SELCNT :
     C                                     SELS(1) : IACNT : INTATR(1) :
     C                                     CALEN : CHRATR : CMPCOD :
     C                                     REASON)
The prototype definition for the call is:
     D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
     DMQINQ            PR                  EXTPROC('MQINQ')
     D* Connection handle
     D HCONN                         10I 0 VALUE
     D* Object handle
     D HOBJ                          10I 0 VALUE
     D* Count of selectors
     D SELCNT                        10I 0 VALUE
     D* Array of attribute selectors
     D SELS                          10I 0
     D* Count of integer attributes
     D IACNT                         10I 0 VALUE
     D* Array of integer attributes
     D INTATR                        10I 0
     D* Length of character attributes buffer
     D CALEN                         10I 0 VALUE
     D* Character attributes
     D CHRATR                          *   VALUE
     D* Completion code
     D CMPCOD                        10I 0
     D* Reason code qualifying CMPCOD
     D REASON                        10I 0