When you add a referential or check constraint, the system automatically
checks all the records in the database file to ensure that they meet the constraint
definition. If the constraint is not valid or if it cannot be verified, the
system places it in check pending status.
This check is also performed when the system is being restored.
To
work with the constraints that are in check pending status, follow these steps:
- Make the constraint inactive by running the Change Physical File
Constraint (CHGPFCST) command and specifying *DISABLED on the Constraint state
parameter.
- Display the list of records that caused the constraint to be marked
as check pending by running the Display Check Pending Constraints (DSPCPCST)
command.
Note: The length of time that this command runs depends
on the number of records the file contains.
- Schedule the verification of the constraints that are in check
pending status by running the Edit Check Pending Constraints (EDTCPCST) command.
- Make the constraint active by running the CHGPFCST command again
and specify *ENABLED on the Constraint state parameter.