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

81 lines
4.6 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: build-key function" />
<meta name="abstract" content="The example in this topic shows the usages of various parameters of the build-key function." />
<meta name="description" content="The example in this topic shows the usages of various parameters of the build-key function." />
<meta name="DC.Relation" scheme="URI" content="rbal3copyrrk.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3buildkey" />
<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: build-key function</title>
</head>
<body id="rbal3buildkey"><a name="rbal3buildkey"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: build-key function</h1>
<div><p>The example in this topic shows the usages of various parameters
of the build-key function.</p>
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
<table cellpadding="4" cellspacing="0" summary="" border="0"><thead align="left"><tr><th align="left" valign="bottom" width="20%" id="d0e18">Key field number</th>
<th align="left" valign="bottom" width="20%" id="d0e20">Type</th>
<th align="left" valign="bottom" width="20%" id="d0e22">Length</th>
<th align="left" valign="bottom" width="24.62962962962963%" id="d0e24">Decimal precision</th>
<th align="left" valign="bottom" width="15.37037037037037%" id="d0e26">Value</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="20%" headers="d0e18 "> 1</td>
<td align="left" valign="top" width="20%" headers="d0e20 ">CHAR</td>
<td align="left" valign="top" width="20%" headers="d0e22 "> 6</td>
<td align="left" valign="top" width="24.62962962962963%" headers="d0e24 ">&nbsp;</td>
<td align="left" valign="top" width="15.37037037037037%" headers="d0e26 ">KEN</td>
</tr>
<tr><td align="left" valign="top" width="20%" headers="d0e18 "> 2</td>
<td align="left" valign="top" width="20%" headers="d0e20 ">ZONED</td>
<td align="left" valign="top" width="20%" headers="d0e22 "> 6</td>
<td align="left" valign="top" width="24.62962962962963%" headers="d0e24 "> 2</td>
<td align="left" valign="top" width="15.37037037037037%" headers="d0e26 ">54.25</td>
</tr>
<tr><td align="left" valign="top" width="20%" headers="d0e18 "> 3</td>
<td align="left" valign="top" width="20%" headers="d0e20 ">BINARY</td>
<td align="left" valign="top" width="20%" headers="d0e22 "> 4</td>
<td align="left" valign="top" width="24.62962962962963%" headers="d0e24 "> 1</td>
<td align="left" valign="top" width="15.37037037037037%" headers="d0e26 ">10.1</td>
</tr>
</tbody>
</table>
</td></tr></table>
<div class="section"><div class="p">You can specify the FROMKEY (or TOKEY) parameter as follows: <pre>FROMKEY( 2 x'D2C5D5404040F0F0F5F4F2F50065')</pre>
</div>
<div class="p">Or, you can use the *BLDKEY value and specify the FROMKEY as follows: <pre>FROMKEY(*BLDKEY (KEN 54.25 10.1))</pre>
</div>
<div class="p">Another
example using key fields 1 and 2 is: <pre>FROMKEY(2 'KEN 005425')</pre>
</div>
<div class="p">Or,
you can specify the *BLDKEY value: <pre>FROMKEY(*BLDKEY (KEN 54.25))</pre>
</div>
</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>