Each record in the file has an embedded key (called a key data item) that is associated with an index. An index provides a logical path to the data records, according to the contents of the associated embedded record key data items. Only database and DISK files can have indexed organization.
When records are inserted, updated, or deleted, they are identified solely by the values of their prime keys. Specify the name of the prime key data item on the RECORD KEY clause of the FILE-CONTROL paragraph.
A logical file that is opened for OUTPUT does not remove all records in the physical file on which it is based. Instead, the file is opened to allow only write operations, and the records are added to the file.