166 lines
8.8 KiB
HTML
166 lines
8.8 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 2)" />
|
|
<meta name="abstract" content="In this example, a logical file views the same two physical files as in Example 1, but the second record format in the logical file has *NONE specified in key position 2." />
|
|
<meta name="description" content="In this example, a logical file views the same two physical files as in Example 1, but the second record format in the logical file has *NONE specified in key position 2." />
|
|
<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="logfileviewex2" />
|
|
<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 2)</title>
|
|
</head>
|
|
<body id="logfileviewex2"><a name="logfileviewex2"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Specify the key field (example 2)</h1>
|
|
<div><p>In this example, a logical file views the same two physical files
|
|
as in Example 1, but the second record format in the logical file has *NONE
|
|
specified in key position 2.</p>
|
|
<div class="example"> <div class="fignone" id="logfileviewex2__cfig7"><a name="logfileviewex2__cfig7"><!-- --></a><span class="figcap">Figure 1. Specify the key field (example
|
|
2)</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*
|
|
00060A R JOBHST PFILE(JOBHSTP)
|
|
00070A K EMPNBR <span><span>1</span></span>
|
|
00080A K *NONE <span><span>2</span></span>
|
|
00090A K JOBDTE <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="d0e50">Record format</th>
|
|
<th valign="top" width="25%" id="d0e52">Key positions</th>
|
|
<th valign="top" width="25%" id="d0e54"> </th>
|
|
<th valign="top" width="25%" id="d0e55"> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="25%" headers="d0e50 "> </td>
|
|
<td valign="top" width="25%" headers="d0e52 "><span>1</span></td>
|
|
<td valign="top" width="25%" headers="d0e54 "><span>2</span></td>
|
|
<td valign="top" width="25%" headers="d0e55 "><span>3</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="25%" headers="d0e50 ">CLSHST</td>
|
|
<td valign="top" width="25%" headers="d0e52 ">EMPNBR</td>
|
|
<td valign="top" width="25%" headers="d0e54 ">CLSDTE</td>
|
|
<td valign="top" width="25%" headers="d0e55 ">*NONE</td>
|
|
</tr>
|
|
<tr><td valign="top" width="25%" headers="d0e50 ">JOBHST</td>
|
|
<td valign="top" width="25%" headers="d0e52 ">EMPNBR</td>
|
|
<td valign="top" width="25%" headers="d0e54 ">*NONE</td>
|
|
<td valign="top" width="25%" headers="d0e55 ">JOBDTE</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>As in the example in the Using *NONE in the key field when creating
|
|
a DDS file topic, all records from the two physical files are first merged
|
|
and sequenced together on employee number (EMPNBR). However, the records for
|
|
each student are merged and sequenced first on class date (CLSDTE) and then
|
|
on job assignment date (JOBDTE). The set of records used for that example
|
|
are now retrieved as follows:</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="d0e96">EMPNBR</th>
|
|
<th valign="top" width="20%" id="d0e98">CLSDTE</th>
|
|
<th valign="top" width="20%" id="d0e100">JOBDTE</th>
|
|
<th valign="top" width="40%" id="d0e102">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="20%" headers="d0e96 ">1005</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">3/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed class</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1005</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">4/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Left to begin new job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1005</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">6/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed class</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1005</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">4/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1006</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">3/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed class</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1006</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">5/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Transferred to new location</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1006</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">1/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1006</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">2/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1007</td>
|
|
<td valign="top" width="20%" headers="d0e98 ">8/79</td>
|
|
<td valign="top" width="20%" headers="d0e100 "> </td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Left because of illness</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1007</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">1/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1007</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">4/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e96 ">1007</td>
|
|
<td valign="top" width="20%" headers="d0e98 "> </td>
|
|
<td valign="top" width="20%" headers="d0e100 ">7/79</td>
|
|
<td valign="top" width="40%" headers="d0e102 ">Completed job</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>When several adjacent record formats have *NONE in the same key
|
|
position, they form a set, relative to record formats specified before and
|
|
after them, that functions in sequencing as an individual record format. Key
|
|
fields specified after *NONE serve to merge and sequence records of the formats
|
|
within the set. The following example shows how several record formats function
|
|
as a set.</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> |