Field xxx causes duplicate database data
This warning means that your record definition should be restructured. Your current definition is set up in such a way that:
* you have overlapping key fields, and
* both keys must be represented in the database as separate items.
The interface will handle this situation correctly. It will keep the overlapping keys updated simultaneously, so that they always have the same value. However, the warning alerts you that you have the same data represented twice in the database. This is dangerous, because someone at the site might access the database via SQL and accidentally change only one of the keys.
Here's an example of the problem, and a description of how to correct it (the example assumes that both key-1 and key-2 have been declared as keys):
01 order-record. 03 key-1. 05 field-a pic x(5). 05 field-b pic 9(5). 05 key-2 redefines field-b pic x(3).This example will generate the warning message.
Because key-2 is a key, it must also be represented in the database. It doesn't correspond exactly to any other data field, so it must be entered as a separate column in the database.
In the COBOL view of the file, key-1 and key-2 overlap. But the requirements of database storage force the same data (known to COBOL as field-b) to be physically represented twice in the database. Any updates to the data from any ACUCOBOL-GT program will correctly update both columns. Updates from outside of ACUCOBOL-GT carry no such guarantee.
In this example, you can correct the situation by breaking field-b into two columns, so that key-2 corresponds exactly to another data field:
01 order-record.03 key-1. 05 field-a pic x(5). 05 field-b. 07 field-b1 pic x(3). 07 field-b2 pic 9(2). 05 key-2 redefines field<-b pic x(3).
xxx not unique in first 18 characters
This message occurs if a field name is not unique within the first 18 characters. The xxx is the name found. You can either change the field name or apply the NAME directive.
This is the end of the Performance and Troubleshooting section. Click the Contents button at the top of this window to return to the Table of Contents page.