ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3copyrrn.htm

83 lines
5.5 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Select records by relative record numbers (FROMRCD and TORCD parameters)" />
<meta name="abstract" content="You can use the FROMRCD and TORCD parameters to copy files with specifying their record numbers. Note that you can use these parameters on the CPYF command only." />
<meta name="description" content="You can use the FROMRCD and TORCD parameters to copy files with specifying their record numbers. Note that you can use these parameters on the CPYF command only." />
<meta name="DC.Relation" scheme="URI" content="rbal3selrecords.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3add.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3copyrrn" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Select records by relative record numbers (FROMRCD and TORCD parameters)</title>
</head>
<body id="rbal3copyrrn"><a name="rbal3copyrrn"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Select records by relative record numbers (FROMRCD and TORCD parameters)</h1>
<div><p>You can use the FROMRCD and TORCD parameters to copy files with
specifying their record numbers. Note that you can use these parameters on
the CPYF command only.</p>
<div class="p">Relative record numbers can be specified for a copy from any file type
except a keyed logical file. A keyed physical file can be copied in arrival
order if relative record numbers are specified for the FROMRCD or TORCD parameter.
Records can be copied: <ul><li>From a specified record number (FROMRCD parameter) to a specified record
number (TORCD parameter) OR</li>
<li>Until a specified number of records (NBRRCDS parameter) has been copied</li>
</ul>
If the command reaches the end of the file before it reaches the specified
ending record number or number of records, the copy completes normally.</div>
<p>When a relative record number is specified, records are copied, starting
with the specified relative record number, in the order in which they physically
exist in the database file being copied from. This is true even if the physical
file has a keyed sequence access path. You can use the COMPRESS parameter
with the FROMRCD and TORCD parameters to further define which records you
want to select for copying.</p>
<p>If the from-file is a physical file or a logical file with an arrival sequence
access path, the TORCD value is a relative record number that counts both
the deleted and undeleted records ahead of it. If the from-file is a device
file or inline data file, the TORCD value is a record number that includes
only undeleted records (even for an I-format diskette file).</p>
<p>Deleted records retain their position among records that are not deleted.
However these records do not necessarily retain their relative record number
when they are copied if they are in the specified subset and COMPRESS(*NO)
is specified. If you specify COMPRESS(*YES), the command skips the deleted
records and does not copy them. In this case, when the record number that
is specified (FROMRCD parameter) is a deleted record, copying starts with
the first undeleted record that follows.</p>
<div class="p">This example shows how you can use the command to copy records from relative
record number 500 to relative record number 1000 in the file EMP1 to the file
EMP1T. <pre>CPYF FROMFILE(PERSONNEL/EMP1) +
TOFILE(TESTLIB1/EMP1T) MBROPT(*REPLACE) +
FROMRCD(500) TORCD(1000)</pre>
</div>
<div class="note"><span class="notetitle">Note:</span> If you use record numbers to select records, you cannot use record keys
(FROMKEY/TOKEY parameters) to select records on the same CPYF command.</div>
<p>For information about using the FROMRCD and TORCD parameters with distributed
files, see <a href="../dbmult/rzaf3kickoff.htm">DB2<sup>®</sup> Multisystem
for <span class="keyword">iSeries™</span></a> .</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3selrecords.htm" title="You can use parameters on the copy commands to select only the specific records that you want to copy.">Select the records to copy</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbal3add.htm" title="When you specify *ADD, each record copied is added to the end of the existing records in the member.">Specify *ADD when copying files</a></div>
</div>
</div>
</body>
</html>