Usage notes: Reorganizing a physical file member
Here is a list of considerations for reorganizing a physical file member.
- If a physical file member has an arrival sequence access path and you reorganize it using a keyed sequence access path, the arrival sequence access path is changed. That is, the records in the member are physically placed in the order of the keyed sequence access path. By reorganizing the data into a physical sequence that closely matches the keyed access path you are using, you can improve the performance of processing the data sequentially.
- Reorganizing a physical file member compresses deleted records, which changes subsequent relative record numbers.
- Because access paths with the following DDS keywords specified depend on the physical sequence of records in the physical file member, the sequence of the records with duplicate key fields might change after you reorganize a physical file member using a keyed sequence access path:
The sequence of the records with duplicate key fields are maintained only for the access path specified in the KEYFILE parameter. If the access path specified in the KEYFILE parameter has an LIFO DDS keyword, the duplicate key fields are maintained only if you specify that the reorganize operation can be canceled (suspended).
- First-Changed First-Out (FCFO)
- First-In First-Out (FIFO)
- Last-In First-Out (LIFO)
- If you specify that the reorganize operation cannot be canceled and you end the job running the Reorganize Physical File Member (RGZPFM) command, all the access paths over the physical file member might have to be rebuilt. If you specify that the reorganize operation can be canceled, and you cancel the RGZPFM command, only those access paths that are not maintained during the reorganize operation might have to be rebuilt.
- If you use the RGZPFM command twice in a row, you might notice that the total size of the member after the first time differs from the total size after the second. This is because the amount of space allocated for the reorganized member is only an estimate that allows extra space for future insertion. After records are reorganized the first time, the space allocated is calculated exactly.
Parent topic:
Reorganizing a physical file member