ENABLE Reference Manual
 ENABLE FUNCTION KEYS
 Key Fields
 KEY FIELDS
 Many of the operations that you can perform with an ENABLE
 application involve entering values in key fields. Each record
 in a key-sequenced file can have:
 • A primary key field. The value of a primary key field
 uniquely identifies a record within a file; for this reason,
 an ENABLE application will not allow you to enter a value in a
 primary key field if that value already exists in another
 record in the file.
 • Alternate key fields. The value of an alternate key field
 identifies records with a certain property. Some alternate
 key fields require unique values; an ENABLE application will
 not allow you to enter a duplicate value in such alternate key
 fields.
 Each record in a relative, entry-sequenced, or unstructured file
 can have:
 • A courtesy key field. This key field corresponds to the
 primary key field of key-sequenced files. A courtesy key
 field identifies the unique record number of each record
 within such files. Within these files, the record number has
 the following significance:
 --For relative files, the record number corresponds to the
 physical position of a record within the file. The first
 record position is 0, the next record position is 1, and so
 forth. A record position exists whether or not a record has
 been stored in that position.
 --For entry-sequenced files, the record number corresponds to
 the order in which a record is stored in the file. The
 first record is 0, the next record is 1, and so forth.
 Record numbers are always in ascending order, but the
 numbering sequence is not always in steps of 1. Record 32,
 for example, could be followed by record 4096. Refer to the
 ENSCRIBE Programming Manual for more information.
 --For unstructured files, the first record is 0, the next is
 1, and so forth. The last record in the file always has the
 highest record number.
 • Alternate key fields. Both relative and entry-sequenced files
 can have any number of alternate key fields. Alternate key
 fields are not allowed for unstructured files.
 8-6










