| **Navigation:**  [[introduction.htm|Language Reference]] > 5 - Declaration Attributes > Variable and Entity Attributes >====== DUP (allow duplicate KEY entries) ====== | [[driver specify data file type .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[encrypt encrypt data file .htm|{{btn_next_n.gif|Next page}}]] | | || **DUP** {{blk2blue.jpg|blk2blue.jpg}} The **DUP** attribute (PROP:DUP) of a KEY declaration allows multiple records with the same key values to occur in a FILE. If the DUP attribute is omitted, attempting to ADD or PUT records with duplicate key values will generate the "Creates Duplicate Key" error, and the record will not be written to the file. During sequential processing using the KEY, records with duplicate key values are accessed in the physical order their entries appear in the KEY. The GET and SET statements generally access the first record in a set of duplicates. The DUP attribute is unnecessary on INDEX declarations because an INDEX always allows duplicate entries. **Example:** **Names   FILE,DRIVER('Clarion'),PRE(Nam)** **NameKey  KEY(Nam:Name),****DUP****       !Declare name key, allow duplicate names** **NbrKey   KEY(Nam:Number)         !Declare number key, no duplicates allowed** **Rec      RECORD** **Name      STRING(20)** **Number    SHORT** **         END** **        END** **See Also:** [[key declare dynamic file access index .htm|KEY]] [[get read a record or entry .htm|GET]] [[set initiate sequential file processing .htm|SET]]