Example: Reorganizing a physical file member

 

The example shows how to reorganize a physical file member with the Reorganize Physical File Member (RGZPFM) command. For example, the following RGZPFM command reorganizes the first member of a physical file using an access path of a logical file member:

RGZPFM  FILE(DSTPRODLB/ORDHDRP)
        KEYFILE(DSTPRODLB/ORDFILL  ORDFILL)

Physical file member ORDHDRP has an arrival sequence access path. You reorganize it using the access path of logical file member ORDFILL. Assume that the key field is the Order field. The following tables show how records are arranged.

This table shows the original physical file member ORDHDRP. Record 3 is deleted before the RGZPFM command is run.

Relative record number Cust Order Ordate. . .
1 41394 41882 072480. . .
2 28674 32133 060280. . .
3 deleted record  
4 56325 38694 062780. . .

This table shows the physical file member ORDHDRP after you reorganize it using the Order field as the key field in ascending sequence.

Relative record Number Cust Order Ordate. . .
1 28674 32133 060280. . .
2 56325 38694 062780. . .
3 41394 41882 072480. . .

 

Parent topic:

Reorganizing a physical file member using the Reorganize Physical File Member (RGZPFM) command