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:
- Information about objects on a remote queue manager. (MQINQ only
returns information from the local queue manager.)
- Reply messages ready-formatted for printing. (MQINQ returns
information that is not formatted.)
- Other information that MQINQ does not provide.
The format of the replies from these commands:
- DISPLAY ARCHIVE
- DISPLAY CMDSERV
- DISPLAY CHINIT
- DISPLAY GROUP
- DISPLAY LOG
- DISPLAY MAXSMSGS
- DISPLAY SECURITY
- DISPLAY SYSTEM
- DISPLAY THREAD
- DISPLAY TRACE
- DISPLAY USAGE
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:
- DISPLAY AUTHINFO
- DISPLAY CFSTATUS
- DISPLAY CFSTRUCT
- DISPLAY CHANNEL
- DISPLAY CHSTATUS
- DISPLAY CLUSQMGR
- DISPLAY CONN
- DISPLAY NAMELIST
- DISPLAY PROCESS
- DISPLAY QMGR
- DISPLAY QUEUE
- DISPLAY QSTATUS
- DISPLAY STGCLASS
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:
- msg_no is an 8 character message number
- +CSQ1 is the command prefix string
- attr_name is the attribute or keyword name
- value is the attribute value
The format of the attributes and their values follow these rules:
- Not all attributes have associated values.
- Each attribute or attribute and value pair is separated by one or more
blanks.
- Attributes are not always returned in the same order.
- 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:
- Character string lengths are the same as those given in the WebSphere MQ Application Programming Reference manual.
- 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.
- 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.
- The number of attributes returned depends on what attributes are requested
by the command.
- Some attributes return a list of values, each fixed length, separated
by commas, as follows:
- 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().
- 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.
- The MSGDATA, SENDDATA and RCVDATA attributes of a channel return multiple
values in a list, each 32 characters long.
- The COMPHDR and COMPMSG channel attributes return a list of keywords,
each 10 characters long.
- The CONNOPTS and OPENOPTS keywords return a list of option values, each
30 characters long.
- Many of the monitoring attributes return a pair of integers, each 10 characters
long.
- Attributes that normally require quotes around the string because they
contain embedded blanks, lowercase characters, or special characters, are
returned without the quotes.
- 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')
You 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 you must add the quotes
as follows:
DESCR('Sales enquiries queue')
If the attribute itself contains any quotes, you must double
them.