RRDS example

The sample program (CCNGVS4) in Figure 1 illustrates the use of an RRDS file. It performs the following operations:

  1. Opens an RRDS file in record mode (the cluster must be defined)
  2. Writes three records (RRN 2, RRN 10, and RRN 32)
  3. Sets the file position to the first record
  4. Reads the first record in the file
  5. Deletes it
  6. Locates the last record in the file and sets the access direction to backwards
  7. Reads the record
  8. Updates the record
  9. Sets the _EDC_RRDS_HIDE_KEY environment variable
  10. Reads the next record in sequence (RRN 10) into a character string