ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/chgpfcst.htm

201 lines
7.5 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Change PF Constraint (CHGPFCST)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CHGPFCST.Top_Of_Page"></a>
<h2>Change PF Constraint (CHGPFCST)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#CHGPFCST.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CHGPFCST.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CHGPFCST.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CHGPFCST"></a>
<p>The Change Physical File Constraint (CHGPFCST) command changes the state of one or more check constraints for a file or referential constraints between local database files. For referential constraints, the local database files of a constraint are physical files that have been defined in a parent and dependent relationship with either the SQL interface or the Add Physical File Constraint (ADDPFCST) command. For check constraints, the file for the check expression is the file that has been defined in a constraint with either the SQL interface or the Add Physical File Constraint (ADDPFCST) command.
</p>
<p>The state of a referential constraint can be changed to disabled (stopped from providing referential integrity) or, if it has been disabled, to enabled (providing referential integrity again). The state of a check constraint can be changed to disabled (stopped from providing validity checking) or, if it has been disabled, to enabled (providing validity checking again). The alternative to changing the state of the constraint is to remove it when you do not want it to be used, and add it again when you need it.
</p>
<p><b>Restrictions:</b>
</p>
<ul>
<li>You must have object management (*OBJMGT) or object alter (*OBJALTER) authority to the physical file.
</li>
<li>You must have execute (*EXECUTE) authority to the library that contains the physical file.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CHGPFCST.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#CHGPFCST.FILE"><b>FILE</b></a></td>
<td valign="top">File</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: File</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#CHGPFCST.CST"><b>CST</b></a></td>
<td valign="top">Constraint name</td>
<td valign="top">Single values: *ALL, *CHKPND<br>Other values (up to 300 repetitions): <i>Character value</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#CHGPFCST.STATE"><b>STATE</b></a></td>
<td valign="top">Constraint state</td>
<td valign="top"><b><u>*SAME</u></b>, *ENABLED, *DISABLED</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CHGPFCST.FILE"></a>
<h3>File (FILE)</h3>
<p>Specifies the file or dependent file for which a constraint is being changed, and the library of the file or dependent file. The file must be a physical file and it must allow a maximum of one member (MAXMBRS(1)).
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 1: File</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the physical file.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPFCST.CST"></a>
<h3>Constraint name (CST)</h3>
<p>Specifies the name of the constraint relationship being changed.
</p>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*ALL</b></dt>
<dd>All of the constraint relationships for the file or dependent file are changed.
</dd>
<dt><b>*CHKPND</b></dt>
<dd>The constraint relationships that have records that possibly are in violation of the constraints and are pending verification (check pending) are changed.
</dd>
</dl>
<p><b>Other values (up to 300 repetitions)</b>
</p>
<dl>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the name of the constraint relationship.
<p>
<b>Note: </b>The case is preserved when lowercase characters are specified.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGPFCST.STATE"></a>
<h3>Constraint state (STATE)</h3>
<p>Specifies the state to which the constraint is being changed. You can use this parameter to temporarily stop (disable) a defined or established constraint from providing referential integrity (*REFCST) or data validity checking (*CHKCST), or to make a constraint that was previously disabled to start working again (enable).
</p>
<dl>
<dt><b><u>*SAME</u></b></dt>
<dd>The value does not change.
</dd>
<dt><b>*ENABLED</b></dt>
<dd>The constraint that was disabled starts providing referential integrity (*REFCST) or validity checking (*CHKCST) again.
</dd>
<dt><b>*DISABLED</b></dt>
<dd>The constraint stops providing referential integrity or validity checking.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGPFCST.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
CHGPFCST FILE(ADMN/PERSONNEL) CST(*CHKPND)
STATE(*DISABLED)
</pre>
</p>
<p>This command disables the referential constraints that have caused records in the PERSONNEL file of the ADMN library to be in check pending status. While referential integrity is disabled, the user can correct the records that are causing the check pending.
</p>
<p>After the records are corrected, the following command is run to provide referential integrity again.
</p>
<p>
<pre>
CHGPFCST FILE(ADMN/PERSONNEL) CST(*CHKPND)
STATE(*ENABLED)
</pre>
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGPFCST.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF32B2</b></dt>
<dd>Constraint cannot be changed for file &amp;1.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGPFCST.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>