Copy operation on files in check-pending status
When the parent or dependent file has an established constraint relationship that is in check-pending status, the rules described in this topic apply.
- If the from-file has an established constraint relationship in check pending, data access is restricted. If the from-file is a parent file, the command can read and copy data to the to-file. If the from-file is a dependent file, the command cannot read data to the to-file, and therefore cannot copy the data to the to-file.
- If the to-file has an established constraint relationship in check pending status, data access is restricted. If the to-file is a parent file, you can add new records (you can specify MBROPT(*ADD)). If the to-file is a parent file, you cannot clear the file (you cannot specify MBROPT(*REPLACE)). If the to-file is a dependent file, you cannot perform the copy regardless of which MBROPT parameter keyword you use.
To circumvent the above rules, you can disable the involved constraints before the copy operation, perform the copy, and then re-enable the constraints. However the file will be in check pending status if constraint rules are still not met.
Parent topic:
Preventing errors when copying files
Related concepts
Prevention of copy errors that result from constraint relationships