Copying deleted records (COMPRESS parameter)
You might want to copy deleted records to preserve the relative record numbers of records that are copied from the from-file. You can copy both deleted and undeleted records from one physical file member to another by specifying the COMPRESS(*NO) parameter on a copy command.
If you do not use COMPRESS(*NO), only records that have not been deleted are copied from the from-file.
You can use this parameter on the CPYF command only.
- Requirements of COMPRESS(*NO) parameter and the CPYF command
To use COMPRESS(*NO), the conditions discussed in this topic must be true.
- Restrictions of the COMPRESS(*NO) parameter and the CPYF command
You cannot specify COMPRESS(*NO) for the cases discussed in this topic.
- 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.
Parent topic:
Selecting the records to copy
Related concepts
Specifying *ADD when copying files
Selecting records using a specified record format name (RCDFMT parameter)