Using the DISPLAY commands

To obtain information about WebSphere MQ, use the WebSphere MQ MQSC DISPLAY commands. Use these commands rather than MQINQ if you want:

The format of the replies from these commands:

is the same, regardless of whether you issue the command from an application program or from a z/OS console, with one reply for each line you see on the z/OS console. However, if you issue DISPLAY commands listed below for WebSphere MQ objects or object status, the format is different when they are issued from an application program:

Whereas on the z/OS console you get one line for each attribute and value, for an application program there is only one message for each object.

The format of these reply messages is:

   msg_no +CSQ1 attr_name(value) attr_name attr_name(value)

where:

The format of the attributes and their values follow these rules:

  1. Not all attributes have associated values.

  2. Each attribute or attribute and value pair is separated by one or more blanks.

  3. Attributes are not always returned in the same order.

  4. The attribute values returned are fixed length and surrounded by parentheses.

    Integer values are ten characters long, right justified, and padded with blanks.

    Character values are left justified and padded with blanks. Their lengths are as follows:

    1. Character string lengths are the same as those given in the WebSphere MQ Application Programming Reference manual.

    2. Attributes that return a keyword, for example, DEFSOPT returns EXCL or SHARED, are 10 characters long, left justified, and padded with blanks, with the exception of the TYPE attribute for queues, which is 8 characters long.

    3. Some attribute keywords can take negated values, for example, NOTRIGGER, NOSHARE, and NOHARDENBO. The attribute keywords that can have negated values take their length from the negated value. For example, the negated equivalent of SHARE is NOSHARE; it has a length of 7. These attributes are left justified and padded with blanks.

  5. The number of attributes returned depends on what attributes are requested by the command.

  6. Some attributes return a list of values, each fixed length, separated by commas, as follows:

    1. The NAMES attribute returns a list of names. Use the NAMCOUNT attribute to discover the number of names in the list. If there are no names in the list, the NAMES attribute is returned as NAMES().

    2. The MSGEXIT, SENDEXIT and RCVEXIT attributes of a channel return multiple values in a list, each of 128 characters. There can be any number of entries in the list from zero to 8.

    3. The MSGDATA, SENDDATA and RCVDATA attributes of a channel return multiple values in a list, each 32 characters long.

    4. The COMPHDR and COMPMSG channel attributes return a list of keywords, each 10 characters long.

    5. The CONNOPTS and OPENOPTS keywords return a list of option values, each 30 characters long.

    6. Many of the monitoring attributes return a pair of integers, each 10 characters long.

  7. Attributes that normally require quotes around the string because they contain embedded blanks, lowercase characters, or special characters, are returned without the quotes.

  8. When you want to use the reply to a DISPLAY command as input to another command, put single quotes (' ') around each attribute. For example, if you define this queue:

       +CSQ1 DEFINE QLOCAL(SALES) DESCR('Sales enquiries queue')

    We can display it using the command:

       +CSQ1 DISPLAY QUEUE(SALES) DESCR

    The DESCR attribute is displayed as:

       DESCR(Sales enquiries queue)

    To use this description in another command add the quotes as follows:

       DESCR('Sales enquiries queue')

    If the attribute itself contains any quotes, double them.