DSNU340I csect-name - ERROR LOADING INDEX, DUPLICATE KEY, INDEX=index-name, TABLE=table-name, RID OF INDEXED ROW=indexed-row, RID OF NON-INDEXED ROW=nonindexed-row

Explanation

A duplicate key was found during the BUILD phase of REORG INDEX or REBUILD INDEX, or a duplicate hash key was found during the BUILD phase of REORG INDEX. The duplicate key violates the uniqueness rule for the index or the hash key.

csect-name
The name of the control section that issued the message.
index-name
The name of the index.
table-name
The name of the table.
indexed-row
The record ID (RID) of the indexed row.
nonindexed-row
The record ID (RID) of the non-indexed row.

System action

All duplicate index entries of the indicated index are reported and the index is placed in RECOVERY PENDING status. Duplicate rows are present in the indexed table.

Utility processing continues with any other utility functions within the utility job step.

Operator response

Notify the system programmer.

System programmer response

Take steps to inhibit any further processing until the index is repaired. Applications that are dependent upon the uniqueness of the table rows should not be initiated until corrective action has been taken.

If the nonunique keys are correct, drop and re-create the index as nonunique.

If the records with duplicate keys should not be in the table, use the REPAIR utility with the DELETE option to remove the incorrect rows. Use the RID values provided in the message as input to the REPAIR utility.

After the duplicate data rows are removed or the unique index has been dropped, issue the DISPLAY DATABASE command with the RESTRICT option against the target database. Use the REBUILD INDEX utility to recover any indexes that are in the REBUILD pending state. Optionally, use the CHECK INDEX utility to verify that the data and indexes are consistent.

User response

Notify the system programmer.

Problem determination

Use the REPAIR utility with LOCATE RID and DUMP statements to view the records with duplicate keys.

The inconsistent index can cause SQLSELECT to fail. Use CHECK INDEX to check the validity of the index.

Severity

8 (error)