ENABLE User's Guide
 USING AN ENABLE APPLICATION
 Courtesy Key
 Alternate Key
 An application can identify a single record or a set of records
 by the contents of an alternate key field. If, for example, the
 department number of an employee record is an alternate key, you
 can retrieve all records of that file sequentially, in
 department-number order.
 Courtesy Key
 ENABLE supplies a special courtesy key field for certain types of
 files. An application can identify a particular record in one of
 these files by the value of this courtesy key. The courtesy key
 corresponds to a unique record number associated with each record
 within a relative, entry-sequenced, or unstructured file.
 For a relative file, the record number corresponds to the
 physical position of the 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
 actually been stored in that position.
 For an entry-sequenced file, the record number corresponds to the
 order in which a record is stored in the file. The first record
 stored has record number 0, the next record stored has record
 number 1, and so forth. The record numbers are always in
 ascending order, but the numbering sequence is not always in
 increments of one. Record 4096, for example, could follow record
 32. The last record stored in the file always has the highest
 record number.
 For an unstructured file, the first record is record 0, the next
 record 1, and so forth. The last record stored in the file
 always has the highest record number.
 When you insert a record with a courtesy key, you do not have to
 supply a value for that key. Instead, the application can
 provide a value for you.
 As described later under "Labels and Fields," you can visually
 identify a courtesy key field; however, you cannot visually
 determine the type of file to which a courtesy key belongs. If
 you need to determine the file type, ask your data administrator.
 8-5










