197 lines
11 KiB
HTML
197 lines
11 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="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="Arrange key fields in ascending or descending sequence" />
|
||
|
<meta name="abstract" content="Key fields can be arranged in either ascending or descending sequence." />
|
||
|
<meta name="description" content="Key fields can be arranged in either ascending or descending sequence." />
|
||
|
<meta name="DC.subject" content="key field, arranging, ascending sequence, descending sequence, field, arranging keys, arranging key fields, descending sequence" />
|
||
|
<meta name="keywords" content="key field, arranging, ascending sequence, descending sequence, field, arranging keys, arranging key fields, descending sequence" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafoksapa.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafoascdes" />
|
||
|
<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>Arrange key fields in ascending or descending sequence</title>
|
||
|
</head>
|
||
|
<body id="rbafoascdes"><a name="rbafoascdes"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Arrange key fields in ascending or descending sequence</h1>
|
||
|
<div><p>Key fields can be arranged in either ascending or descending sequence.
|
||
|
</p>
|
||
|
<p>Consider the following records.</p>
|
||
|
|
||
|
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
|
||
|
<table cellpadding="4" cellspacing="0" summary="" width="100%" border="0"><thead align="left"><tr><th align="left" valign="top" width="20%" id="d0e46">Record</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e48">Empnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e50">Clsnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e52">Clsnam</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e54">Cpdate</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="20%" headers="d0e46 ">1</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">56218</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e46 ">2</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">41322</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">011388</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e46 ">3</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">64002</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">011388</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e46 ">4</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">23318</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e46 ">5</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">41321</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">051888</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e46 ">6</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e48 ">62213</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e50 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e52 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e54 ">032188</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</td></tr></table>
|
||
|
<div class="p">If the <em>Empnbr</em> field is the key field, the two possibilities for
|
||
|
organizing these records are:<ul><li>In ascending sequence, where the order of the records in the access path
|
||
|
is.
|
||
|
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
|
||
|
<table cellpadding="4" cellspacing="0" summary="" width="90%" border="0"><thead align="left"><tr><th align="left" valign="top" width="20%" id="d0e140">Record</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e142">Empnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e144">Clsnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e146">Clsnam</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e148">Cpdate</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="20%" headers="d0e140 ">4</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">23318</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e140 ">5</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">41321</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">051888</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e140 ">2</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">41322</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">011388</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e140 ">1</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">56218</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e140 ">6</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">62213</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e140 ">3</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e142 ">64002</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e144 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e146 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e148 ">011388</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</td></tr></table>
|
||
|
</li>
|
||
|
<li>In descending sequence, where the order of the records in the access path
|
||
|
is.
|
||
|
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
|
||
|
<table cellpadding="4" cellspacing="0" summary="" width="90%" border="0"><thead align="left"><tr><th align="left" valign="top" width="20%" id="d0e228">Record</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e230">Empnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e232">Clsnbr</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e234">Clsnam</th>
|
||
|
<th align="left" valign="top" width="20%" id="d0e236">Cpdate</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="20%" headers="d0e228 ">3</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">64002</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">011388</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e228 ">6</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">62213</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e228 ">1</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">56218</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">032188</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e228 ">2</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">41322</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">011388</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e228 ">5</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">41321</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">051888</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="20%" headers="d0e228 ">4</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e230 ">23318</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e232 ">412</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e234 ">Welding I</td>
|
||
|
<td align="left" valign="top" width="20%" headers="d0e236 ">032188</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</td></tr></table>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>When you describe a key field, the default
|
||
|
is ascending sequence. However, you can use the DESCEND DDS keyword
|
||
|
to specify that you want to arrange a key field in descending sequence.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoksapa.htm" title="A keyed sequence access path for database files is based on the contents of the key fields as defined in data description specifications (DDS). This topic describes how the key fields are arranged for the file.">Use a keyed sequence access path for database files</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|