![[UNIX, Linux, Windows, IBM i]](ngmulti.gif)
mqrc (display return code and AMQ message information)
Use the mqrc command to display information about symbols, return codes, and AMQ messages. You can specify a range of return codes or AMQ messages, as well as specifying specific return codes or AMQ messages.
Numeric arguments are interpreted as decimal if they start with a digit 1 - 9, or hex if prefixed with 0x.
Syntax
Parameters
- returnCode
- The return code to display
- AMQmessage
- The AMQ message to display
- symbol
- The symbol to display
- -a
- Try all severities to find message text
- -b
- Display messages without extended information
- -f first
- First number in a range
- -l last
- Last number in a range
- -m AMQmessage
- The AMQ message to list
- -M
- Display AMQ messages in a range
- -r returnCode
- The return code to display
- -R
- Display all return codes. If used with the -f and -l parameters, -R displays the return codes within a range.
- -s symbol
- The symbol to display
- -
- If a - is given as a trailing parameter, it indicates that further input
will come from
stdin
. -d language
- Display the message in the specified language, for example,
Fr_FR
. - -i format
- Determine the message to display from a message in the specified format, which must be one of
the following:
- text
- The textual format of the QMErrorLog service, including the Insert attributes.
- json
- JSON format diagnostic messages, specified in UTF-8.
- -o format
- Display the message in the specified format, which must be one of the following:
- mqrc
- The format used by mqrc in previous versions of the product.
- text
- The textual format of the QMErrorLog service.
- json
- The JSON format, described in JSON format diagnostic messages.
-p
- Display the message explanation only. For
example:
displaysmqrc -p AMQ8118
The queue manager insert_5 does not exist.
-u
- Display the user response only. For
example:
displaysmqrc -u AMQ8118
Either create the queue manager (crtmqm command) or correct the queue manager name used in the command and then try the command again.
- -x
- Display extended message information, including the message severity. For example, the following
message has an error (E) severity of
30:
mqrc -x AMQ8118 536903960 0x20008118 E 30 urcMS_MQCONN_FAILED 536903960 0x20008118 E 30 zrc_CSPRC_Q_MGR_DOES_NOT_EXIST MESSAGE: IBM MQ queue manager does not exist. EXPLANATION: The queue manager <insert three> does not exist. ACTION: Either create the queue manager (crtmqm command) or correct the queue manager name used in the command and then try the command again.
Examples
- This command displays AMQ message 5005:
mqrc AMQ5005
- This command displays return codes in the range 2505 - 2530:
mqrc -R -f 2505 -l 2530
- Running the following command, where
AMQERR01.json
contains JSON formatted messages in any language, converts all messages into US English in the original textual QMErrorLog format:cat AMQERR01.json | mqrc -d En_US -i json -o text -
Alternatively, you could takeAMQERR01.LOG
and convert it to JSON:cat AMQERR01.LOG | mqrc -i text -o json -
- Running the following command, where
AMQERR01.LOG
contains text formatted messages in any language, converts messages into US English:cat AMQERR01.LOG | mqrc -d En_US -i text -o text -