Before you reorganize a physical file, consider which access path is most important to you. Taking the default of reorganizing by the key specified in the physical file DDS may not always produce the best performance for your particular applications. Let's use the example of a customer master file that is indexed by customer number, but must be scanned quickly by your phone order-entry users in company name order. The reorganization default is to physically order the records by customer number. The best performance can be achieved by sequencing the file in the same order as the customer name access path used by the order-entry program. This is easy to do with the RGZPFM command. The following command will reorganize file CUSTMAST by customer name by using the existing logical file member CUSTMAST01 in logical file
CUSTMAST01: RGZPFM FILE(CUSTLIB/CUSTMAST) + MBR(*FIRST) KEYFILE(CUSTLIB/CUSTMAST01 + CUSTMAST01)
Midrange Computing
LATEST COMMENTS
MC Press Online