Details of the COMPRESS(*NO) parameter and the CPYF command
The COMPRESS(*NO) parameter allows the system to copy more quickly because records are transferred in blocks, but this is not always true. Typically, the COMPRESS(*NO) function does not significantly affect performance. Before you specify the COMPRESS(*NO) parameter, be aware that when you use the COMPRESS(*NO) parameter, the system takes the following actions:
The run time and resource that are required to rebuild the keyed access paths might outweigh the performance benefit that is gained by copying deleted records.
- Before the records are copied, the system invalidates any keyed access paths that use the to-file member.
- After the copy operation is complete, the system rebuilds the access paths.
If you do not specify the COMPRESS(*NO) parameter, the system might still use the internal functions to perform the copy, but the choice of how the copy is performed is based on the number of records in the from-file and to-file members before the copy, and the number of keyed access paths over the to-file member.
If you specify the MBROPT(*REPLACE) parameter, all keyed access paths over the to-file member must be invalidated and rebuilt, so specifying COMPRESS(*NO) does not cause any additional overhead for rebuilding access paths.
If the from-file is a keyed physical file and neither a FROMRCD nor TORCD relative record number value is specified on the copy commands to force the file to be processed in arrival sequence, COMPRESS(*NO) has no meaning because a keyed access path never contains any deleted records.
Parent topic:
Copying deleted records (COMPRESS parameter)