Reorganizing a physical file member using the Reorganize Physical File Member (RGZPFM) command
You can specify several key options when you reorganize a physical file member using 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 physical file member in the order in which you normally access them sequentially, thereby minimizing the time required to retrieve records. You can do this by using the KEYFILE parameter. This might be advantageous for members that are primarily accessed in an order other than arrival sequence. You can reorganize a physical file member using either of the following key fields:
- Key fields of the physical file member
- Key fields of a logical file member that is based on the physical file
Key fields are defined at the file level.
- 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 member that was previously used by variable-length fields in the physical file format and that has become fragmented.
- Example: Reorganizing a physical file member
The example shows how to reorganize a physical file member with the Reorganize Physical File Member (RGZPFM) command.
Parent topic:
Reorganizing a physical file member
Related reference
Reorganize Physical File Member (RGZPFM) command
Usage notes: Reorganizing a physical file member