You can specify how access paths are maintained for closed files
with the MAINT parameter.
While a file is open, the system maintains the access path for this file
when changes are made to the data in it. However, because more than one access
path can exist for the same data, changing data in one file might cause changes
in the access paths for other files that are not currently open (in use).
The three ways of maintaining access paths for closed files are:
- Immediate maintenance of an access path means that the access path
is maintained when changes are made to its associated data, whether the file
is open or not. Access paths used by referential constraints are always in
immediate maintenance.
- Rebuild maintenance of an access path means that the access path
is only maintained while the file is open, not when the file is closed; the
access path is rebuilt when the file is opened the next time. When a file
with rebuild maintenance is closed, the system stops maintaining the access
path. When the file is opened again, the access path is totally rebuilt. If
one or more programs have opened a specific file member with rebuild maintenance
specified, the system maintains the access path for that member until the
last user closes the file member.
- Delayed maintenance of an access path means that any maintenance
for the access path is done after the file member is opened the next time
and while it remains open. However, the access path is not rebuilt as it is
with rebuild maintenance. Changes to the access path are collected
from the time the member is closed until it is opened again. When it is opened,
only the collected changes are merged into the access path.
If you do not specify the type of maintenance for a file, the default is
immediate maintenance.