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

54 lines
3.5 KiB
HTML

<?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="reference" />
<meta name="DC.Title" content="Example: using FROMKEY and TOKEY" />
<meta name="abstract" content="In this example, the copy command copies records in the file EMP1 to the file EMP1T. EMP1T is a file in a test library. Because you only need a subset of the records, you specify a from-key value and a to-key value. Both are full key values." />
<meta name="description" content="In this example, the copy command copies records in the file EMP1 to the file EMP1T. EMP1T is a file in a test library. Because you only need a subset of the records, you specify a from-key value and a to-key value. Both are full key values." />
<meta name="DC.Relation" scheme="URI" content="rbal3copyrrk.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3fromkey" />
<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>Example: using FROMKEY and TOKEY</title>
</head>
<body id="rbal3fromkey"><a name="rbal3fromkey"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: using FROMKEY and TOKEY</h1>
<div><p>In this example, the copy command copies records in the file EMP1
to the file EMP1T. EMP1T is a file in a test library. Because you only need
a subset of the records, you specify a from-key value and a to-key value. Both are full key values. </p>
<div class="section"><div class="p"> Note that a 1 specified in the FROMKEY and TOKEY parameters indicates
the number of key fields to be used in searching the record keys, starting
with the first key field. <pre>CPYF FROMFILE(PERSONNEL/EMP1) +
TOFILE(TESTLIB1/EMP1T) MBROPT(*REPLACE) +
FROMKEY(1 438872) TOKEY(1 810199)</pre>
</div>
</div>
<div class="section"><p>All positions in a key value should be specified. If the value
is shorter than the key field length, it will be padded on the right with
zeros. Thus, a 5-position key field specified as FROMKEY(1 8) causes a search
for a key equal to hex F800000000. If the key value contains blanks or special
characters, you must enclose them in apostrophes.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3copyrrk.htm" title="You can specify record keys to copy only from a keyed database file. Note that you can use this parameter on the CPYF command only.">Select records by record keys (FROMKEY and TOKEY Parameters)</a></div>
</div>
</div>
</body>
</html>