Read a Record

You can read a specific record from a file in two ways using the relative byte address:

The READ (direct) operations work in the same way, but do not require the bits in the FCD to be set. The READ (direct) operations always return the record at the address given in the relative byte address field of the FCD and update the current record pointer.

Both of the above methods provide a way of switching the current key-of-reference to a different key. For example, if READ (sequential) operations are performed via the prime key, you can start reading via the first alternate key from the current record using the following steps:

  1. Read the next record in the file (the address of this record is in the FCD relative byte address field)
  2. Put the new key-of-reference in fcd-key-id in the FCD
  3. Perform a READ (direct) operation to return the record at this address. The key-of-reference is changed to the new one
  4. Read the next record in the file. This is the next record in the new key-of-reference index