134 lines
7.0 KiB
HTML
134 lines
7.0 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="reference" />
|
||
|
<meta name="DC.Title" content="Specify the key field (example 3)" />
|
||
|
<meta name="abstract" content="In this example, consider a logical employee file over five physical files." />
|
||
|
<meta name="description" content="In this example, consider a logical employee file over five physical files." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="lkeynm.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="logfileviewex3" />
|
||
|
<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>Specify the key field (example 3)</title>
|
||
|
</head>
|
||
|
<body id="logfileviewex3"><a name="logfileviewex3"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Specify the key field (example 3)</h1>
|
||
|
<div><p>In this example, consider a logical employee file over five physical
|
||
|
files.</p>
|
||
|
<div class="example"> <div class="fignone" id="logfileviewex3__cfig8"><a name="logfileviewex3__cfig8"><!-- --></a><span class="figcap">Figure 1. Specify the key field (example 3)</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
||
|
00010A R EMPMST PFILE(EMPMSTP)
|
||
|
00020A K EMPNBR <span><span>1</span></span>
|
||
|
00030A*
|
||
|
00040A R CLSREG PFILE(CLSREGP)
|
||
|
00050A K EMPNBR <span><span>1</span></span>
|
||
|
00060A K CLSDTE <span><span>2</span></span>
|
||
|
00070A*
|
||
|
00080A R CLSHST PFILE(CLSHSTP)
|
||
|
00090A K EMPNBR <span><span>1</span></span>
|
||
|
00100A K CLSDTE <span><span>2</span></span>
|
||
|
00110A*
|
||
|
00120A R JOBHST PFILE(JOBHSTP)
|
||
|
00130A K EMPNBR <span><span>1</span></span>
|
||
|
00140A K *NONE <span><span>2</span></span>
|
||
|
00150A K JOBDTE <span><span>3</span></span>
|
||
|
00160A*
|
||
|
00170A R ACTHST PFILE(ACTHSTP)
|
||
|
00180A K EMPNBR <span><span>1</span></span>
|
||
|
00190A K *NONE <span><span>2</span></span>
|
||
|
00200A K ACTDTE <span><span>3</span></span>
|
||
|
A</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><thead align="left"><tr><th valign="top" width="25%" id="d0e71">Record format</th>
|
||
|
<th valign="top" width="25%" id="d0e73">Key positions</th>
|
||
|
<th valign="top" width="25%" id="d0e75"> </th>
|
||
|
<th valign="top" width="25%" id="d0e76"> </th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td valign="top" width="25%" headers="d0e71 "> </td>
|
||
|
<td valign="top" width="25%" headers="d0e73 "><span>1</span></td>
|
||
|
<td valign="top" width="25%" headers="d0e75 "><span>2</span></td>
|
||
|
<td valign="top" width="25%" headers="d0e76 "><span>3</span></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%" headers="d0e71 ">EMPMST</td>
|
||
|
<td valign="top" width="25%" headers="d0e73 ">EMPNBR</td>
|
||
|
<td valign="top" width="25%" headers="d0e75 ">*NONE</td>
|
||
|
<td valign="top" width="25%" headers="d0e76 ">*NONE</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%" headers="d0e71 ">CLSREG</td>
|
||
|
<td valign="top" width="25%" headers="d0e73 ">EMPNBR</td>
|
||
|
<td valign="top" width="25%" headers="d0e75 ">CLSDTE</td>
|
||
|
<td valign="top" width="25%" headers="d0e76 ">*NONE</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%" headers="d0e71 ">CLSHST</td>
|
||
|
<td valign="top" width="25%" headers="d0e73 ">EMPNBR</td>
|
||
|
<td valign="top" width="25%" headers="d0e75 ">CLSDTE</td>
|
||
|
<td valign="top" width="25%" headers="d0e76 ">*NONE</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%" headers="d0e71 ">JOBHST</td>
|
||
|
<td valign="top" width="25%" headers="d0e73 ">EMPNBR</td>
|
||
|
<td valign="top" width="25%" headers="d0e75 ">*NONE</td>
|
||
|
<td valign="top" width="25%" headers="d0e76 ">JOBDTE</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%" headers="d0e71 ">ACTHST</td>
|
||
|
<td valign="top" width="25%" headers="d0e73 ">EMPNBR</td>
|
||
|
<td valign="top" width="25%" headers="d0e75 ">*NONE</td>
|
||
|
<td valign="top" width="25%" headers="d0e76 ">ACTDTE</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<p>The records are merged and sequenced as follows:</p>
|
||
|
<ol><li>All records are merged and sequenced by employee number.</li>
|
||
|
<li>For a given employee, records are sequenced by: <ol type="a"><li>The master record (of the EMPMST format)</li>
|
||
|
<li>Records of the CLSREG and CLSHST formats, merged and sequenced together
|
||
|
on values of CLSDTE (key position 2)</li>
|
||
|
<li>Records of the JOBHST and ACTHST formats, merged together and sequenced
|
||
|
together on values of JOBDTE and ACTDTE (key position 3)</li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
</ol>
|
||
|
<div class="p">Specifying *NONE in the key definitions achieves this sequencing as
|
||
|
follows: <ul><li>*NONE and a field name, CLSDTE, appear in the second key position of the
|
||
|
adjacent formats, CLSHST and JOBHST. This effectively causes a split between
|
||
|
the two formats after the preceding key position (position 1). Records of
|
||
|
formats above the split are merged and sequenced with records of formats below
|
||
|
the split only on values of EMPNBR.</li>
|
||
|
<li>An implicit *NONE in the second key position of the format EMPMST forces
|
||
|
a similar split.</li>
|
||
|
<li>With *NONE in key position 2, the JOBHST and ACTHST formats form a set
|
||
|
in which the values of JOBDTE and ACTDTE are compared in order to merge and
|
||
|
sequence records of these two formats only.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="p">The record sequence defined by the previous key specifications
|
||
|
is totally dependent on the order in which the formats are specified. For
|
||
|
example, if JOBHST is specified before CLSHST, key position 2 will read: <pre>*NONE, CLSDTE, *NONE, CLSDTE, *NONE</pre>
|
||
|
</div>
|
||
|
<p>Here,
|
||
|
the values of CLSDTE within CLSREG will not be sequenced with the values of
|
||
|
CLSDTE within CLSHST, and JOBDTE will not be sequenced with ACTDTE.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="lkeynm.htm" title="When you specify K in position 17, the name specified in positions 19 through 28 is a key field name.">Key field name</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|