I am writing a Natural program for inserting and storing many records into an Adabas file. There are chances of duplicates records getting inserted in same file. Is there any duplicate key or duplicate record error in Adabas, which may cause Abend? Should I handle such error as we do in DB2?
With Natural, it is typically up to the programmer to have some knowledge of any descriptors that should be unique and to perform the necessary check for the existence of a “primary key” value before storing a record. In Adabas, there is no concept of primary key even though it’s possible to use the unique attribute. My experience is that it is seldom used.
The remedy for this is to not allow a programmer who would do such a thing near a keyboard.