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

494 lines
20 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Reorganize Physical File Mbr (RGZPFM)</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="RGZPFM.Top_Of_Page"></a>
<h2>Reorganize Physical File Mbr (RGZPFM)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Conditional
</td>
<td valign="top" align="right">
<a href="#RGZPFM.PARAMETERS.TABLE">Parameters</a><br>
<a href="#RGZPFM.COMMAND.EXAMPLES">Examples</a><br>
<a href="#RGZPFM.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="RGZPFM"></a>
<p>The Reorganize Physical File Member (RGZPFM) command removes deleted records from (compresses) one member of a physical file in the database, and it optionally reorganizes that member.
</p>
<p>If a keyed file is identified in the <b>Key file (KEYFILE)</b> parameter, the system reorganizes the member by changing the physical sequence of the records in storage to either match the keyed sequence of the physical file member's access path, or to match the access path of a logical file member that is defined over the physical file. Reorganization can decrease file processing time when a program is reading sequentially through a keyed physical file or through a keyed logical file.
</p>
<p>When the member is reorganized and KEYFILE(*NONE) is not specified, the sequence in which the records are actually stored is changed, and any deleted records are removed from the file. If KEYFILE(*NONE) is specified or defaulted, the sequence of the records does not change, but deleted records are removed from the member. Optionally, new sequence numbers and zero date fields are placed in the source fields of the records. These fields are changed after the member has been compressed or reorganized.
</p>
<p><b>Notes:</b>
</p>
<ul>
<li>If you cancel this command, the system rebuilds any access paths that are not maintained during the reorganize. If ALWCANCEL(*NO) is specified, any updates to a physical file member with a unique access path over it are prevented until the access path is completely rebuilt.
</li>
<li>If you cancel this command and ALWCANCEL(*YES) is specified, the reorganize will be partially complete. Subsequently, another reorganize with the same parameters may be able to continue from where the last reorganize ended.
</li>
<li>The RGZPFM command ignores all file overrides that are currently in effect for the job. The file names specified on the FILE and KEYFILE parameters identify the files actually used in the reorganize operation, regardless of overrides that may exist for these files.
</li>
</ul>
<p><b>Restrictions:</b>
</p>
<ul>
<li>During the reorganization of a physical member, the file being reorganized is locked. The <b>Lock state (LOCK)</b> parameter can be specified to indicate how much concurrent access to the physical file member should be allowed.
</li>
<li>The user needs object operational authority, object management or alter authority, all data authority to the physical file containing the member to be reorganized, and execute authority to the library. The user also needs object operational authority to the file specified on the KEYFILE parameter and execute authority to the library.
</li>
<li>In multi-threaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA. This command is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="RGZPFM.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="#RGZPFM.FILE"><b>FILE</b></a></td>
<td valign="top">Data base 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: Data base 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="#RGZPFM.MBR"><b>MBR</b></a></td>
<td valign="top">Member</td>
<td valign="top"><i>Name</i>, <b><u>*FIRST</u></b>, *LAST</td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top" rowspan="5"><a href="#RGZPFM.KEYFILE"><b>KEYFILE</b></a></td>
<td valign="top">Key file</td>
<td valign="top">Single values: <b><u>*NONE</u></b>, *FILE, *RPLDLTRCD<br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="5">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Logical file</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Logical file</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top">Element 2: Member</td>
<td valign="top">
<i>Name</i></td>
</tr>
<tr>
<td valign="top"><a href="#RGZPFM.RBDACCPTH"><b>RBDACCPTH</b></a></td>
<td valign="top">Rebuild access paths</td>
<td valign="top"><b><u>*YES</u></b>, *OPTIMIZE, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RGZPFM.ALWCANCEL"><b>ALWCANCEL</b></a></td>
<td valign="top">Allow cancel</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RGZPFM.LOCK"><b>LOCK</b></a></td>
<td valign="top">Lock state</td>
<td valign="top"><b><u>*EXCL</u></b>, *EXCLRD, *SHRUPD</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RGZPFM.SRCOPT"><b>SRCOPT</b></a></td>
<td valign="top">Source update options</td>
<td valign="top">Single values: <b><u>*SAME</u></b><br>Other values (up to 2 repetitions): *SEQNBR, *DATE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#RGZPFM.SRCSEQ"><b>SRCSEQ</b></a></td>
<td valign="top">Source sequence numbering</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Starting sequence number</td>
<td valign="top">
0.01-9999.99, <b><u>1.00</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Increment number</td>
<td valign="top">
0.01-9999.99, <b><u>1.00</u></b></td>
</tr>
<tr>
<td valign="top"><a href="#RGZPFM.RCDFMT"><b>RCDFMT</b></a></td>
<td valign="top">Record format</td>
<td valign="top"><i>Name</i>, <b><u>*ONLY</u></b></td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="RGZPFM.FILE"></a>
<h3>Data base file (FILE)</h3>
<p>Specifies the physical file whose member is to be reorganized.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 1: Data base 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 thread is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
</dd>
</dl>
<dl>
<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="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.MBR"></a>
<h3>Member (MBR)</h3>
<p>Specifies the member to be reorganized.
</p>
<dl>
<dt><b><u>*FIRST</u></b></dt>
<dd>The first, or the only, member in the file is reorganized.
</dd>
<dt><b>*LAST</b></dt>
<dd>The last, or the only, member in the file is reorganized.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the file member to be reorganized.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.KEYFILE"></a>
<h3>Key file (KEYFILE)</h3>
<p>Specifies whether the physical file member has its arrival sequence changed to match its keyed sequence, is reorganized in the sequence of a logical file member, or is <i>not</i> reorganized. If this parameter specifies a multiple-format logical file and member, the <b>Record format (RCDFMT)</b> parameter must also be specified.
</p>
<p>
<b>Note: </b>Join logical files cannot be specified as key files, and a logical file in this parameter is not allowed to have a select/omit access path.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>The member is not reorganized; it is only compressed by having deleted records removed.
</dd>
<dt><b>*RPLDLTRCD</b></dt>
<dd>The member will be reorganized by replacing deleted records at the start of the file with valid records from the end of the file. If the rows must exactly match the current arrival sequence, do not use *RPLDLTRCD.
</dd>
<dt><b>*FILE</b></dt>
<dd>For a physical file member having a keyed sequence access path, the arrival sequence of the records in the member is changed to match their keyed sequence.
</dd>
</dl>
<p><b>Element 1: Logical file</b>
</p>
<p>Specify the name and library of the logical file associated with the physical file member.
</p>
<dl>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 1: Logical file</b>
</p>
<dl>
<dt><b><i>file-name</i></b></dt>
<dd>Specify the name of the logical file to use as the key file.
</dd>
</dl>
</dd>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the job's library list are searched until the first match is found.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the file. If no library is specified as the current library for the job, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</dd>
</dl>
<p><b>Element 2: Member</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the member of the logical file whose sequence is used to reorganize the physical file member.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.RBDACCPTH"></a>
<h3>Rebuild access paths (RBDACCPTH)</h3>
<p>Specifies whether to rebuild or maintain any valid access paths (other than an access path specified as the KEYFILE or a MAINT(*REBLD) access path) over the member.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>Access paths will be rebuilt synchronously at the end of the reorganize operation.
</dd>
<dt><b>*OPTIMIZE</b></dt>
<dd>Access paths will either be rebuilt asynchronously at the end of the reorganize operation, or maintained during the reorganize, based on which method will result in the access paths being rebuilt the fastest.
</dd>
<dt><b>*NO</b></dt>
<dd>Access paths will be maintained during the reorganize.
<p>If *NO is specified, ALWCANCEL(*YES) must also be specified.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.ALWCANCEL"></a>
<h3>Allow cancel (ALWCANCEL)</h3>
<p>Specifies whether to allow the reorganize to be canceled.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The reorganize cannot be canceled. If the job ends and the reorganize of the data has not finished, any changes up to the point of the failure are discarded.
<p>If *NO is specified, KEYFILE(*RPLDLTRCD) and RDBACCPTH(*NO) must not be specified, and LOCK(*EXCL) must also be specified.
</p>
</dd>
<dt><b>*YES</b></dt>
<dd>The reorganize can be canceled. If a reorganize is canceled before it is finished, a subsequent reorganize with the same parameters will typically continue the reorganize from where it ended. If the number of changes that have occurred since the reorganize was canceled is too large, the reorganize may be restarted rather than continued.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.LOCK"></a>
<h3>Lock state (LOCK)</h3>
<p>Specifies the lock to acquire on the physical file member. The lock state will determine how much concurrent access is allowed by other jobs during the reorganize.
</p>
<dl>
<dt><b><u>*EXCL</u></b></dt>
<dd>An exclusive lock is acquired. No concurrent access to the physical file member is allowed from another job.
</dd>
<dt><b>*EXCLRD</b></dt>
<dd>An exclusive allow read lock is acquired. Concurrent read access to the physical file member is allowed from another job.
<p>If *EXCLRD is specified, ALWCANCEL(*YES) must also be specified.
</p>
</dd>
<dt><b>*SHRUPD</b></dt>
<dd>A shared update lock is acquired. Concurrent update, delete, and insert access to the physical file member is allowed from another job.
<p>If *SHRUPD is chosen, the resulting order of the rows may not exactly match what was requested on the KEYFILE keyword. The rows will be reorganized to closely match the specified order, but concurrent update, delete, and insert operations will cause some rows to not be reorganized. If the rows must exactly match the arrival sequence (*NONE) or a keyed file sequence, do not use *SHRUPD.
</p>
<p>If *SHRUPD is specified, ALWCANCEL(*YES) must also be specified.
</p>
</dd>
</dl>
<p>
<b>Note: </b>Additional details about lock states can be found in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.SRCOPT"></a>
<h3>Source update options (SRCOPT)</h3>
<p>Specifies, for physical <i>source</i> files only, whether the member places new numbers in the sequence number field, places zeros in the date field, or changes both fields. Changes occur after the records are compressed or reorganized.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*SAME</u></b></dt>
<dd>The sequence number field and date field of records do not change.
</dd>
</dl>
<p><b>Other values </b>
</p>
<dl>
<dt><b>*SEQNBR</b></dt>
<dd>The records have a new sequence number placed into the sequence number field. The SRCSEQ parameter specifies a start value and a value to be added.
</dd>
<dt><b>*DATE</b></dt>
<dd>The records have a null date (000000) placed in the date field.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.SRCSEQ"></a>
<h3>Source sequence numbering (SRCSEQ)</h3>
<p>Specifies, only when *SEQNBR is also specified on the SRCOPT parameter, the sequence number that is given to the first record in the source file member and the increment value that is used to renumber all other records in the member. If the member is renumbered but this parameter is not specified, 1.00 is assumed for sequence number and increment value.
</p>
<p><b>Element 1: Starting sequence number </b>
</p>
<dl>
<dt><b><u>1.00</u></b></dt>
<dd>The first source record in the member has a sequence number of 0001.00.
</dd>
<dt><b><i>0.01-9999.99</i></b></dt>
<dd>Specify the sequence number of the first source record in the member. A whole number of up to 4 digits or a fraction of up to 2 digits can be specified. If the starting value contains a fraction, a decimal point must be used.
</dd>
</dl>
<p><b>Element 2: Increment number </b>
</p>
<dl>
<dt><b><u>1.00</u></b></dt>
<dd>The source records are renumbered in the member with whole number increments of 1 (for example, 1.00, 2.00, 3.00...).
</dd>
<dt><b><i>0.01-9999.99</i></b></dt>
<dd>Specify the increment value for renumbering all source records following the first record. A whole number of no more than four digits or a fraction of no more than two digits can be specified. If the increment value contains a fraction, a decimal point must be used.
<p>For example, if SRCSEQ(5000 10) is specified, the first record in the reorganized member is numbered 5000.00, the second is 5010.00, the third is 5020.00, and so on. If SRCSEQ(*N .25) is specified, the records are numbered 1.00, 1.25, 1.50, 1.75, 2.00, and so on. If a starting value of .01 and an increment value of .01 are specified, there are 999,999 unique sequence numbers possible. If the maximum sequence number of 9999.99 is reached, the remaining records are also assigned the sequence number 9999.99.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RGZPFM.RCDFMT"></a>
<h3>Record format (RCDFMT)</h3>
<p>Specifies the record format name if the physical file member is reorganized in the sequence of a multiple-format logical file.
</p>
<dl>
<dt><b><u>*ONLY</u></b></dt>
<dd>The logical file specified by the <b>Key file (KEYFILE)</b> parameter has only one record format. That format is used to reorganize the physical file member.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of a record format in the multiple-format logical file that is used to reorganize the physical file member.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RGZPFM.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Reorganizing by Deleting Records</b>
</p>
<p>
<pre>
RGZPFM FILE(PAYROLL) MBR(MBR1)
</pre>
</p>
<p>This command compresses member MBR1 of the PAYROLL file by removing the deleted records from the file member.
</p>
<p><b>Example 2: Reorganizing by Replacing Deleted Records</b>
</p>
<p>
<pre>
RGZPFM FILE(PAYROLL) MBR(MBR1) KEYFILE(*RPLDLTRCD)
ALWCANCEL(*YES) LOCK(*EXCLRD)
</pre>
</p>
<p>This command compresses member MBR1 of the PAYROLL file by replacing deleted records at the start of the file with valid records from the end of the file. The command may be canceled and other jobs are allowed to read data from the PAYROLL file while the reorganize is in progress.
</p>
<p><b>Example 3: Reorganizing in Keyed Sequence</b>
</p>
<p>
<pre>
RGZPFM FILE(QCLSRC) MBR(CLMBR2) SRCOPT(*SEQNBR *DATE)
KEYFILE(*FILE) SRCSEQ(1.00 .25)
</pre>
</p>
<p>This command reorganizes the member CLMBR2 of the CL source file QCLSRC in keyed sequence, with the sequence number field used as the key. The reorganized member has new sequence numbers (starting at 1.00 and incrementing by .25) and a null date (000000) placed in all records when the original member is reorganized.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RGZPFM.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF2981</b></dt>
<dd>Member &amp;3 file &amp;1 in &amp;2 not reorganized.
</dd>
<dt><b>CPF3135</b></dt>
<dd>Access path for member &amp;2 already in use.
</dd>
<dt><b>CPF32B8</b></dt>
<dd>Distributed file error, reason code &amp;3.
</dd>
<dt><b>CPF32CF</b></dt>
<dd>Distributed file error, reason code &amp;3.
</dd>
<dt><b>CPF32C3</b></dt>
<dd>Distributed file error, level ID mismatch
</dd>
<dt><b>CPF9801</b></dt>
<dd>Object &amp;2 in library &amp;3 not found.
</dd>
<dt><b>CPF9809</b></dt>
<dd>Library &amp;1 cannot be accessed.
</dd>
<dt><b>CPF9810</b></dt>
<dd>Library &amp;1 not found.
</dd>
<dt><b>CPF9820</b></dt>
<dd>Not authorized to use library &amp;1.
</dd>
</dl>
<p><b><u>*NOTIFY Messages</u></b>
</p>
<dl>
<dt><b>CPF2985</b></dt>
<dd>Source sequence numbers exceeded maximum value allowed. (G C)
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RGZPFM.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>