Display default object attributes with DISPLAY QUEUE

We can use the DISPLAY QUEUE command to display attributes that were taken from the default object when an IBM MQ object was defined.


When you define an IBM MQ object, it takes any attributes that we do not specify from the default object. For example, when you define a local queue, the queue inherits any attributes that you omit in the definition from the default local queue, which is called SYSTEM.DEFAULT.LOCAL.QUEUE. We can use the DISPLAY QUEUE command to see exactly what these attributes are.


Procedure

To display the default object attributes for a local queue, use the following command:
DISPLAY QUEUE (SYSTEM.DEFAULT.LOCAL.QUEUE)
The syntax of the DISPLAY command is different from that of the corresponding DEFINE command. On the DISPLAY command we can give just the queue name, whereas on the DEFINE command you have to specify the type of the queue, that is, QLOCAL, QALIAS, QMODEL, or QREMOTE. We can selectively display attributes by specifying them individually. For example:
DISPLAY QUEUE (ORANGE.LOCAL.QUEUE) +
MAXDEPTH +
MAXMSGL +
CURDEPTH;
This command displays the three specified attributes as follows:
AMQ8409: Display Queue details.
QUEUE(ORANGE.LOCAL.QUEUE)        TYPE(QLOCAL)
CURDEPTH(0)               MAXDEPTH(5000)
MAXMSGL(4194304)

CURDEPTH is the current queue depth, that is, the number of messages on the queue. This is a useful attribute to display, because by monitoring the queue depth we can ensure that the queue does not become full.

Parent topic: Work with local queues


Related information