search cancel

CA Datacom MASSADD DB13037E INPUT RECORD NOT ADDED KEY ALREADY EXISTS

book

Article ID: 214536

calendar_today

Updated On:

Products

Datacom/DB Datacom Datacom/AD

Issue/Introduction

Running CA Datacom utility MASSADD and getting report output like this:

                   RECORD **22512000 SUCCESSFULLY ADDED

                   RECORD **22513000 SUCCESSFULLY ADDED

DB13037E - INPUT RECORD (22513226) NOT ADDED, KEY ALREADY EXISTS

                                 ADDED

                   PRD      22,513,226

                   DB10045E - ABNORMAL TERMINATION DUE TO ERROR(S)

Did the MASSADD do a backout to record 22513000?

Or did the MASSADD add up through 22,513,225 -or- 22,513,226?

What should I specify for STARTAFT=  on the restart?

Environment

Release : All releases

Component : CA DATACOM/DB

Resolution

There is no backout performed by MASSADD in this case. When it finds a duplicate record it doesn't add it and stops execution.
The DB13037E message indicates what record number was the duplicate, in this case 22513226. This means it added all records up to record 22513225.
A restart of the MASSADD needs to start from the record after the duplicate so the STARTAFT parameter needs to specify the record that it failed on which is the same as the one in the DB13037E message. In this case specify STARTAFT=22513226.
This is explained in the message DB13037E documentation:
Reason:
During the execution of the DBUTLTY MASSADD function, CA Datacom/DB encountered a record with a Master Key identical to that of an existing record. Since duplicate Master Keys are not allowed in this table, the MASSADD function terminated without adding the record. The position of the record in the input stream replaces nnnnnn in the message text.
Action:
To resume the adding of records starting after the duplicate record, reexecute the MASSADD function with the specification STARTAFT=nnnnnn.