Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

DUPKEY

DFHRESP(DUPKEY) = 15CICS RESP CONDITION · CHECKED 2026-11-14
Checked against IBM documentation

A record was retrieved through an alternate index with non-unique keys, and another record with the same alternate key follows.

QUICK ANSWER

A record was retrieved through an alternate index with non-unique keys, and another record with the same alternate key follows.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. A record was read through an alternate index with the NONUNIQUEKEY attribute.
  2. Another record with the same alternate key follows the one retrieved.

CHECKED 14 Nov 2026 IBM: READ (CICS Transaction Server for z/OS 6.x) · READNEXT (CICS Transaction Server for z/OS 6.x) · EXEC interface block (EIB) fields (CICS Transaction Server for z/OS 6.x)

MOST LIKELY

A record was read through an alternate index with the NONUNIQUEKEY attribute.

FIRST CHECK

Test RESP for DUPKEY; a record was retrieved, and more records with the same key follow.

TRY IT ▸

Site search

What it means

DUPKEY is RESP 15 with RESP2 140 on READ and READNEXT. The record was retrieved through an alternate index with the NONUNIQUEKEY attribute, and another alternate index record with the same key follows.

On READNEXT it is not raised for the last record having that non-unique key. The default action is to end the task abnormally.

Typical causes

  • A record was read through an alternate index with the NONUNIQUEKEY attribute.
  • Another record with the same alternate key follows the one retrieved.

How to fix it

  1. Test RESP for DUPKEY; a record was retrieved, and more records with the same key follow.
  2. To read the rest, continue a browse with READNEXT; DUPKEY is not raised on the last record with that key.
  3. In assembler with SET, the register is not set when DUPKEY occurs but can be loaded from DFHEITP1.

Example

Illustrative only; names and values are invented.

IF WS-RESP = DFHRESP(NORMAL) OR WS-RESP = DFHRESP(DUPKEY)
   PERFORM 2000-SHOW-RECORD
END-IF