You can specify certain fields whose contents are used as record identifiers. These fields, known as Key Fields, are of two orders, primary and secondary. You must declare one or more fields as the Primary Key Field. The Primary Key Field allows quick access to the records stored in the RMSfile by specifying a value for the Primary Key Field. For an invoice record, the Primary Key Field might be the invoice number, whereas for a customer record it would most likely be the customer number. This allows invoices to be retrieved quickly by their invoice number and customer information to be accessed quickly by the customer's code or number.
For hashed RMSfiles, the Primary Key determines where the record is physically stored in the RMSfile, whereas an indexed RMSfile has a separate file (the RMS index file) that contains an index of Key Field values that points to their associated record number. The values of up to eight data fields may be 'concatenated' to form a Primary Key, however only one Primary Key Field 'set' may be defined for an RMSfile.
The third form defines the Primary Key Fields for the RMSfile. The form is shown in the screen below.
You can enter from one to eight fields in the Primary Key Fields form. The fields you specify are concatenated together in the order that they appear in the Primary Key Fields form (left to right, top to bottom; there should not be any 'holes' in the sequence).
Hashed and indexed RMSfiles must have a Primary Key defined.