Datacom return code 10 (039) how to allow duplicate master Key
search cancel

Datacom return code 10 (039) how to allow duplicate master Key

book

Article ID: 279251

calendar_today

Updated On:

Products

Datacom/DB Datacom DATACOM - AD Datacom/AD

Issue/Introduction

An application is getting a Datacom return code 10 (039) because it is trying to add  a record with a duplicate master key.
How do I allow duplicate master keys?

Environment

Release: 15.1

Cause

The return code 10 (39) occurs because the table is defined with DUPE-MASTER-KEY=NO 

Resolution

To allow duplicate master keys make the following changes in Datadictionary:

  • Change the master key to have the attribute UNIQUE=NO
  • Change the table to have attributes CHNG-MASTER-KEY=YES and DUPE-MASTER-KEY=YES

Normally you would copy the existing Datadictionary table definition from PROD into TEST status.
The using DDOL or DDUPDATE (31xx or 1500 transactions) to change the table attributes. 
Then copy the table definition from TEST to PROD status and catalog the definition to the CXX .

Additional Information

See the Datacom documentation section  Master Key