Every MQ MQRC Code

MQRC reason codes are how IBM MQ tells programs what went wrong—or that nothing was wrong. Every MQCONN, MQOPEN, MQPUT, MQGET, and MQCMIT returns a completion code and, when needed, a reason code integer you can look up in documentation, log aggregators, and this reference. Developers who only print getMessage() miss the Reason that support teams need. Operators who only read AMQERR miss the 2085 the Java client saw two seconds earlier. This page is the production-focused MQRC encyclopedia entry: how to read CompCode and Reason together, categories of codes, detailed explanations of the reason codes that appear in most tickets, comparison between similar codes, and links to deep-dive tutorials on this site. IBM publishes the exhaustive list per release; we teach the patterns so you are not memorizing three hundred numbers—you are recognizing families.

Reading CompCode and Reason Together

On a successful MQPUT, CompCode is 0 and Reason is MQRC_OK (0). On failure, CompCode is typically 2 and Reason carries the specific MQRC—for example 2053 when the queue is full. Warnings use CompCode 1 with a non-zero Reason depending on call. Client libraries throw exceptions that wrap the same integers. Always record the API name, object name, queue manager name, and channel if remote. A GET that returns 2033 with CompCode 2 is often normal empty queue behavior when no wait was requested; the same 2033 with wait and timeout may be expected idle consumer behavior—not an incident.

text
1
2
3
4
Log line template for developers: API=MQOPEN QM=QM1 Object=ORDERS.IN QType=local CompCode=2 Reason=2035 (MQRC_NOT_AUTHORIZED) EffectiveUser=mqmapp (from channel MCAUSER if remote)

Category: Connection and Queue Manager

These codes appear on MQCONN, MQCONNX, or when the queue manager is unavailable during any call.

Connection and queue manager MQRC codes
MQRCNameMeaningTypical action
2009CONNECTION_BROKENConnection to QM lost mid-callCheck network, QM restart, firewall; reconnect app
2059QM_NOT_AVAILABLECannot connect to QMdspmq; strmqm; verify host and port in MQSERVER
2058Q_MGR_NAME_ERRORWrong queue manager nameMatch crtmqm name and connection string
2161QM_STOPPINGQM in quiesce or shutdownWait for maintenance end or use alternate QM in HA

Category: Object Names and Definitions

Object errors mean the name in MQOD does not resolve to an accessible definition on the queue manager you reached—not necessarily that the queue never existed anywhere in the enterprise.

Object definition MQRC codes
MQRCNameMeaningTypical action
2085UNKNOWN_OBJECT_NAMEQueue or topic not defined on this QMDISPLAY QLOCAL; cluster REFRESH; fix typo
2082UNKNOWN_ALIAS_BASE_QAlias points to missing baseDISPLAY QALIAS TARGQ; DEFINE base
2087UNKNOWN_OBJECT_Q_MGRRemote QM name wrong on QREMOTEDISPLAY QREMOTE RQMNAME
2110OBJECT_ALREADY_EXISTSDEFINE without REPLACE on existingALTER or DEFINE REPLACE per policy

Category: Authority and Security

Authority failures happen after connect in many cases—the channel shows RUNNING but MQOPEN fails. Grant minimum +connect +put or +get via setmqaut for the MCAUSER or application ID actually in use.

Security-related MQRC codes
MQRCNameMeaningTypical action
2035NOT_AUTHORIZEDOAM or SAF denied operationdspmqaut; CHLAUTH MCAUSER; see 2035 tutorial
2063NOT_AUTHORIZED_FOR_CONNCannot connect as this userCONNAUTH; CHLAUTH; connect authority
2393SSL_INITIALIZATION_ERRORTLS setup failedKeystore, cipher, cert expiry
2397SSL_NOT_ALLOWEDPolicy requires TLS; plain usedSSLCIPH on channel; client TLS

Category: Queue Capacity and Message Availability

Capacity codes reflect MAXDEPTH, message length limits, and whether a message exists for GET.

Capacity and message MQRC codes
MQRCNameMeaningTypical action
2053Q_FULLCURDEPTH at MAXDEPTHScale consumers; raise MAXDEPTH; back pressure
2014MSG_TOO_BIG_FOR_QMessage exceeds MAXMSGLALTER MAXMSGL or shrink payload
2033NO_MSG_AVAILABLENo message for GETNormal if empty; check producer
2071MSG_TOO_BIG_FOR_CHANNELExceeds channel MAXMSGLALTER channel MAXMSGL both sides

Category: Syncpoint, Units of Work, and Poison Messages

Transactional applications see these during commit, rollback, and backout threshold handling.

Transaction-related MQRC codes
MQRCNameMeaningTypical action
2024SYNCPOINT_LIMIT_REACHEDToo many UOW branchesCommit more often; review app logic
2025SYNCPOINT_NOT_AVAILABLEQM or object not syncpoint capableCheck QM and queue attributes
2017MSG_MARKED_BROWSE_COOPERATIONBrowse mark in useReset browse or close handle
2192BACKOUT_THRESHOLD_REACHEDPoison message backout count hitFix consumer; check BOQNAME DLQ

Category: Pub/Sub and Topics

Pub/sub failures add topic string and subscription scope to your log template.

  • 2330 MQRC_SUBSCRIPTION_IN_USE — subscription name conflict; DISPLAY SUB.
  • 2340 MQRC_UNKNOWN_OBJECT_NAME on topic — topic string or DEFINE TOPIC missing.
  • 2035 on publish — often +pub missing on topic string pattern.

How to Look Up Codes Not Listed Here

  1. Note exact Reason integer from application.
  2. Open IBM MQ MQI Reference → Reason Codes for your version.
  3. Search AMQERR for same second for related AMQ text.
  4. Map to layer: connect, channel, object, message, transaction.
  5. Apply one change; retest; document in ticket.

Similar Codes Beginners Confuse

2059 versus 2009: 2059 is cannot establish or QM unavailable at connect; 2009 is had connection then lost it. 2085 versus 2035: 2085 is unknown name; 2035 is name exists but user cannot access. 2033 versus 2053: 2033 is no message to get; 2053 is cannot put because queue full. 2393 versus CHLAUTH block: TLS fails at handshake; CHLAUTH may never show RUNNING. Teaching teams this distinction cuts mean time to repair.

Site-Specific Reason Logging

Wrap MQI in a company logging helper that translates Reason to a short enum for dashboards while preserving the integer for support. Alert on rate of 2053 per queue. Suppress alert noise on 2033 for idle consumers with wait. Never alert on 2033 alone without queue name and consumer identity context.

Explainer: Return Codes on a Form

CompCode is pass or fail on the form. Reason is the checkbox explaining why—wrong desk, building closed, mailbox full, or no mail yet.

Explain Like I'm Five: MQRC

When you ask the mail robot for a letter, it hands you a number. Zero means here is your letter. Other numbers mean try another mailbox, you are not allowed, or the building is closed.

Practice Exercises

Exercise 1

Provoke 2053, 2035, and 2085 in lab; fill in the log template for each.

Exercise 2

From one AMQERR excerpt, identify which MQRC the application likely received.

Exercise 3

Build a team cheat sheet of ten MQRC codes with one-line fixes.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. MQRC_OK equals:

  • 0
  • 2035
  • 2059
  • 9999

2. CompCode 2 with Reason 2085 means:

  • Failed OPEN unknown object
  • Success
  • Warning only
  • Channel RUNNING

3. 2059 often means:

  • Queue manager not available
  • Message too long
  • Browse only
  • Topic retained

4. 2033 on GET means:

  • No message available
  • Not authorized
  • QM deleted
  • SSL error
Published
Read time24 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 MQI Reference