Access Path and Types of Access Paths in AS400 |
Access path
A file contains the access path that describes how the records are retrieved from the file.
Types of Access Path
There are two types of access paths on that basis records are retrieved.
Arrival sequence (Non-keyed) access path
The arrival sequence access path retrieves the record in the order the records are stored in the file.
Keyed-sequence access path
The keyed-sequence access path retrieves the record in the order of the key field defined in the file. The keyed sequence access path gets updated whenever any record gets added, deleted or the value of the key field gets changed.
Example of Keyed-Sequence Access Path
A R RFILE1 A EMPID 2 0 A EMPNAME 20
A UNIQUE A R RDILE1 PFILE(FILE1) A EMPID A EMPNAME A K EMPID
The logical file FILE1LF based on PF FILE1 is a keyed sequence access path having key field EMPID and having Unique records