Other methods to avoid rebuilding access paths
If you do not journal access paths or use system-managed access-path protection (SMAPP), consider other system functions that reduce the chances of rebuilding access paths.
The system uses a file synchronization indicator to determine if an access path needs to be rebuilt. Normally, the synchronization indicator is on, indicating the synchronization of the access path and its associated data. When a job changes a file that affects an access path, the system turns off the synchronization indicator in the file. If the system ends abnormally, it must rebuild any access path whose file has its synchronization indicator off.
You need to periodically synchronize the data with its access path to reduce the number of access paths rebuild. There are several methods to synchronize a file with its access path:
- Full file close. The last full (that is, not shared) system-wide close performed against a file will synchronize the access path and the data.
- Force access path. Specify the force-access-path (FRCACCPTH) parameter on the create, change, or override database file commands.
- Force write ratio of 2 or greater. Specify the force-write-ratio (FRCRATIO) parameter on the create, change, or override database file commands.
- Force end of data. Running the force-end-of-data operation in your program can synchronize the file's data and its access path. (Some high-level languages do not have a force-end-of-data operation. See your high-level language topic collection for further details.)
Performing one of the methods mentioned previously synchronizes the access path and the data. However, the next change to the data in the file can turn the synchronization indicator off again.
Note that each of the methods can be costly in terms of performance; therefore, use them with caution. Consider journaling access paths along with saving access paths or using SMAPP as the primary means of protecting access paths.
Parent topic:
Rebuilding access paths