| Note: | You can use this parameter on the CPYF command only. |
You can copy deleted and undeleted records from one physical file member to another by specifying COMPRESS(*NO) on a copy command.
You may want to copy deleted records to preserve the relative record numbers of records that are copied from the from-file. If you do not use COMPRESS(*NO), only records that are not deleted are copied from the from-file. There are Requirements of COMPRESS(*NO) parameter and the CPYF command, Restrictions of COMPRESS(*NO) parameter and the CPYF command, and more Details of COMPRESS(*NO) parameter and the CPYF command about copying deleted records.
To use COMPRESS(*NO), the following conditions must be true:
You cannot specify COMPRESS(*NO) for the following types of access paths over the to-file, including when the access path is contained in a logical file and is based on the to-file member:
You cannot specify COMPRESS(*NO) for any of the following cases:
COMPRESS(*NO) may allow the system to copy more quickly because records are transferred in blocks, but this is not always true. Usually, the COMPRESS(*NO) function does not significantly affect performance. One of the factors you should consider before you specify COMPRESS(*NO) is that the internal system function that must be used to perform this type of copy invalidates any keyed access paths that use the to-file member before the records are copied and then rebuilds the access paths after the copy is complete. The run time and resource that are required to rebuild the keyed access paths may be larger than the performance benefit that is gained by copying deleted records.
If COMPRESS(*NO) is not specified, the system may 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 MBROPT(*REPLACE) is specified, 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.