The Remove Physical File Constraint (RMVPFCST) command allows you
to remove a physical file constraint. The full effects of the command depend
on the type of constraint you remove and how it is used.
To remove a physical file constraint, use the RMVPFCST command.
- To remove a unique constraint, specify a value of *UNQCST on the Type
parameter.
- To remove a primary key constraint, specify a value of *PRIKEY on the
Type parameter.
- To remove a check constraint, specify a value of *CHKCST on the Type parameter.
You can specify any of the following values on the Constraint (CST) parameter
for each of the constraint types:
- CST(*ALL) to remove all of the constraints you specify on the Type parameter.
- CST(constraint-name) to remove a specific constraint.
- CST(*CHKPND) to remove only those constraints that are in check pending
status.
- Use CST(*ALL) with TYPE(*ALL) to remove all constraints from the file.
You can also remove a constraint using Structured Query Language
(SQL) or iSeries™ Navigator.
Considerations for removing constraints
If
you remove a primary key or a unique constraint, and the associated access
path is shared by a logical file, the ownership of the shared path transfers
to the logical file. If the access path is not shared, it is removed.
When
you remove a primary key constraint with the RMVPFCST command, the system
sends an inquiry message to determine if the key specifications should be
removed from the file. A reply of 'K' maintains the key specifications in
the file. The file remains keyed. A reply of 'G' indicates that the file will
have an arrival sequence access path when the command completes.
Note: When
you remove a primary key constraint with the SQL ALTER TABLE statement, the
inquiry message is not sent. The key specifications are always removed and
the file has an arrival sequence access path when the ALTER TABLE completes.