MainframeKit

2207

MQRC_CORREL_ID_ERROR (X'089F')MQ REASON CODE

An MQGET asked for a message by correlation ID, but the shared queue is not indexed in a way that allows that.

MOST LIKELY

A shared queue was defined with IndexType NONE (or another value) but a program gets by correlation ID.

FIRST CHECK

Display the queue (DISPLAY QLOCAL(name) INDXTYPE) and check its index type.

TRY IT ▸

MainframeKit assistant

What it means

The program tried to pick a specific message by its correlation identifier. On z/OS, when the queue is a shared queue in a coupling facility, that kind of selection only works if the queue's IndexType fits it. The call fails and no message is returned.

Matching on correlation ID alone needs IndexType CORRELID. Matching on correlation ID and message ID together works with IndexType CORRELID or MSGID.

Typical causes

  • A shared queue was defined with IndexType NONE (or another value) but a program gets by correlation ID.
  • A request/reply design reads replies by CorrelId from a shared queue that was never indexed for it.
  • The program sets MQMO_MATCH_CORREL_ID or a non-empty CorrelId by accident, for example a field left over from an earlier call.

How to fix it

  1. Display the queue (DISPLAY QLOCAL(name) INDXTYPE) and check its index type.
  2. If the program really needs to select by correlation ID, change the queue to INDXTYPE(CORRELID).
  3. If it does not, set CorrelId to MQCI_NONE and remove MQMO_MATCH_CORREL_ID from the get-message options.
  4. Reset the MQMD fields before each MQGET so old values do not turn into selection criteria.

Example

Illustrative only; names and values are invented.

MQGET failed  CompCode=2  Reason=2207  Queue=APP.REPLY.SHARED
DISPLAY QLOCAL(APP.REPLY.SHARED) INDXTYPE
  QUEUE(APP.REPLY.SHARED)  INDXTYPE(NONE)