An access path specifies how records from a database file are fetched. We can create permanent access paths such as PF/LF or temporary access paths using the command OPNQRYF.
There are two types of access path
Arrival sequence access path: records are fetched in the same order in which they were inserted in the file. This is similar to processing sequential files based on RRN.
Keyed sequence access path: records are fetched based on the contents of one or more key fields in the file.
You can specify the access path maintenance (MAINT) parameter. If a member of a file is opened, then the system maintains the access path for that member when changes are done to its stored data. However, there are chances that more than one access path might exist for the same data, therefore changing data in one member of a file might cause changes in the access path for other members of a file that are not currently opened. We can maintain access paths of all members of a file in the following ways:
Immediate: This is a default type of maintenance for a file. It means that a file member’s access path is maintained when its data is changed. For example, access paths for the referential constraint are in immediate maintenance.
Rebuild: It means that the access path is maintained for a file member only when the member is open. The access path is rebuilt when the member is opened next time. When a file member is closed, the system stops maintaining the access path for that member.
Delayed: This means that access path maintenance is done only when the member of a file is opened the next time. Access path changes are gathered when a member is closed and until it opens again. Once the member is opened again, only the gathered changes are merged into the access path.
An access path specifies how records from a database file are fetched. We can create permanent access paths such as PF/LF or temporary access paths using the command OPNQRYF.
There are two types of access path
You can specify the access path maintenance (MAINT) parameter. If a member of a file is opened, then the system maintains the access path for that member when changes are done to its stored data. However, there are chances that more than one access path might exist for the same data, therefore changing data in one member of a file might cause changes in the access path for other members of a file that are not currently opened. We can maintain access paths of all members of a file in the following ways: