mqrc (MQ return code)

Display information about return codes.


Purpose

We can use the mqrc command to display information about symbols, return codes, and AMQ messages. We 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

-a

  • -b
  • returnCode-rreturnCode
  • AMQmessage-mAMQmessage
  • -R-ffirst-llast
  • 1
  • -M-ffirst-llast1
  • -ssymbol
  • -
  • -dlanguage
  • -oformat
  • -iformat
  • -p
  • -u
  • -x
  • Notes:

    • 1 If there is a problem with a message within a range, an indication is displayed before the message text. ? is displayed if there are no matching return codes for the message. ! is displayed if the message severity is different to the return code severity.


    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.

      -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.

      -p
      Display the message explanation only. For example:
      mqrc -p AMQ8118
      
      displays
      The queue manager insert_5 does not exist.
      
      -u
      Display the user response only. For example:
      mqrc -u AMQ8118
      displays
      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

    1. This command displays AMQ message 5005:
      mqrc AMQ5005
      
    2. This command displays return codes in the range 2505 - 2530:
      mqrc -R -f 2505 -l 2530
      
    3. 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 take AMQERR01.LOG and convert it to JSON:
      cat AMQERR01.LOG | mqrc -i text -o json -
    4. 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 -