This topic outlines the uses of the Reorganize Physical File Member
(RGZPFM) command.
You can use the RGZPFM command to:
- Remove deleted records to make the space occupied by them available.
- Reorganize the records of a file in the order in which you normally access
them sequentially, thereby minimizing the time required to retrieve records.
This is done using the KEYFILE parameter. This might be advantageous for files
that are primarily accessed in an order other than arrival sequence. A member
can be reorganized using either of the following key fields:
- Key fields of the physical file
- Key fields of a logical file based on the physical file
- Reorganize a source file member, insert new source sequence numbers, and
reset the source date fields (using the SRCOPT and SRCSEQ parameters on the
RGZPFM command).
- If you specify that the reorganize operation cannot be canceled,
reclaim space in the variable portion of the file that was previously used
by variable-length fields in the physical file format and that has become
fragmented.