Work with constraints that are in check pending status

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:

  1. Make the constraint inactive by running the Change Physical File Constraint (CHGPFCST) command and specifying *DISABLED on the Constraint state parameter.
  2. 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.
  3. Schedule the verification of the constraints that are in check pending status by running the Edit Check Pending Constraints (EDTCPCST) command.
  4. Make the constraint active by running the CHGPFCST command again and specify *ENABLED on the Constraint state parameter.
Related reference
Change Physical File Constraint (CHGPFCST) command
Display Check Pending Constraint (DSPCPCST) command
Edit Check Pending Constraint (EDTCPCST) command