ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakb_5.4.0.1/logfileviewex.htm

162 lines
8.7 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="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 1)" />
<meta name="abstract" content="In this example, a logical file views records of two physical files through two different record formats: CLSHST (class history) and JOBHST (job history)." />
<meta name="description" content="In this example, a logical file views records of two physical files through two different record formats: CLSHST (class history) and JOBHST (job history)." />
<meta name="DC.Relation" scheme="URI" content="lkeynm.htm" />
<meta name="DC.Relation" scheme="URI" content="nonekeyfield.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="logfileviewex" />
<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 1)</title>
</head>
<body id="logfileviewex"><a name="logfileviewex"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Specify the key field (example 1)</h1>
<div><p>In this example, a logical file views records of two physical files
through two different record formats: CLSHST (class history) and JOBHST (job
history).</p>
<div class="section"><p>In the logical file, the records from the two physical files can
be merged together and sequenced by employee identification number (EMPNBR)
by specifying EMPNBR in key position 1.</p>
<div class="fignone" id="logfileviewex__cfig6"><a name="logfileviewex__cfig6"><!-- --></a><span class="figcap">Figure 1. Specify
the key field (example 1)</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R CLSHST PFILE(CLSHSTP)
00020A K EMPNBR <span><span>1</span></span>
00030A K CLSDTE <span><span>2</span></span>
00040A*
00050A R JOBHST PFILE(JOBHSTP)
00060A K EMPNBR <span><span>1</span></span>
00070A K JOBDTE <span><span>2</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="33.33333333333333%" id="d0e46">Record format</th>
<th valign="top" width="33.33333333333333%" id="d0e48">Key positions</th>
<th valign="top" width="33.33333333333333%" id="d0e50">&nbsp;</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e46 ">&nbsp;</td>
<td valign="top" width="33.33333333333333%" headers="d0e48 "><span>1</span></td>
<td valign="top" width="33.33333333333333%" headers="d0e50 "><span>2</span></td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e46 ">CLSHST</td>
<td valign="top" width="33.33333333333333%" headers="d0e48 ">EMPNBR</td>
<td valign="top" width="33.33333333333333%" headers="d0e50 ">CLSDTE</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e46 ">JOBHST</td>
<td valign="top" width="33.33333333333333%" headers="d0e48 ">EMPNBR</td>
<td valign="top" width="33.33333333333333%" headers="d0e50 ">JOBDTE</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><p>All records that have the same key value for EMPNBR pertain to
the same employee. To merge and sequence all records for a given employee
into a single history of classes and job assignments, specify CLSDTE (date
of class) and JOBDTE (date of job assignment) in key position 2 for the two
record formats, as shown in the Using *NONE in the key field when creating
a DDS file topic.</p>
<p>Suppose that the job assignment dates and class dates
are the dates (month/year) that the class or assignment started. Records for
three students are retrieved in the following order:</p>
<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="20%" id="d0e87">EMPNBR</th>
<th valign="top" width="20%" id="d0e89">CLSDTE</th>
<th valign="top" width="20%" id="d0e91">JOBDTE</th>
<th valign="top" width="40%" id="d0e93">Description</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="20%" headers="d0e87 ">1005</td>
<td valign="top" width="20%" headers="d0e89 ">3/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Completed class</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1005</td>
<td valign="top" width="20%" headers="d0e89 ">4/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Left to begin new job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1005</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">4/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1005</td>
<td valign="top" width="20%" headers="d0e89 ">6/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Completed class</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1006</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">1/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1006</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">2/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1006</td>
<td valign="top" width="20%" headers="d0e89 ">3/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Completed class</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1006</td>
<td valign="top" width="20%" headers="d0e89 ">5/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Transferred to new location</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1007</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">1/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1007</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">4/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1007</td>
<td valign="top" width="20%" headers="d0e89 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e91 ">7/79</td>
<td valign="top" width="40%" headers="d0e93 ">Completed job</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e87 ">1007</td>
<td valign="top" width="20%" headers="d0e89 ">8/79</td>
<td valign="top" width="20%" headers="d0e91 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e93 ">Left because of illness</td>
</tr>
</tbody>
</table>
</div>
<p>The above report provides a continuous history for each student.</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 class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="nonekeyfield.htm" title="Key fields having the same key position should not be compared under two conditions.">Use *NONE in the key field when creating a DDS file</a></div>
</div>
</div>
</body>
</html>