ILE C/C++ Programmer's Guide


Access Paths

Access paths describe the logical order of records in a file. There are two types of access paths: arrival sequence and keyed sequence.

Records that are retrieved using an arrival sequence access path will be retrieved in the same order in which they were added to the file. This is similar to processing sequential files. New records are physically stored at the end of the file. An arrival sequence access path is valid for both physical and logical files.

Records that are retrieved using a keyed sequence access path are retrieved based on the contents of one or more key fields in the record. This is similar to processing indexed or keyed files on other systems. A keyed sequence access path is updated whenever records are added, deleted, or updated, or when the contents of the key field are changed. This access path is valid for both physical and logical files.

If a file defines more than one record format, each record format may have different key fields. The default key for the file (for example, if no format is specified) will be the key fields that all record formats have in common. If there is no default key (for example, no common key fields), the first record in the file will always be returned on an input operation that does not specify the format.

Note:
When your ILE C/C++ program opens a file, the default is to process the file with the access path that is used to create the file. If you specify arrseq=N (the default), the file is processed the way it was created. This means that if the file was created using a keyed sequence access path, your ILE C/C++ program processes the file by using a keyed sequence access path. If you specify arrseq=Y, the file is processed using arrival sequence. This means that even though the file was created using a keyed sequence access path, your ILE C/C++ program processes the file by using an arrival sequence access path.


[ Top of Page | Previous Page | Next Page | Table of Contents ]