92 lines
5.8 KiB
HTML
92 lines
5.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="concept" />
|
||
<meta name="DC.Title" content="Specify key fields from different files" />
|
||
<meta name="abstract" content="A dynamic keyed sequence access path over a join logical file allows you to specify a processing sequence in which the keys can be in different physical files (DDS restricts the keys to the primary file)." />
|
||
<meta name="description" content="A dynamic keyed sequence access path over a join logical file allows you to specify a processing sequence in which the keys can be in different physical files (DDS restricts the keys to the primary file)." />
|
||
<meta name="DC.subject" content="specifying, key field, from different files, specifying from different files, example, specifying key fields, from different files" />
|
||
<meta name="keywords" content="specifying, key field, from different files, specifying from different files, example, specifying key fields, from different files" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbafodynrs.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="rbafokfdf" />
|
||
<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 key fields from different files</title>
|
||
</head>
|
||
<body id="rbafokfdf"><a name="rbafokfdf"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Specify key fields from different files</h1>
|
||
<div><p>A dynamic keyed sequence access path over a join logical file allows
|
||
you to specify a processing sequence in which the keys can be in different
|
||
physical files (DDS restricts the keys to the primary file).</p>
|
||
<p>The specification is identical to the previous method. The access path
|
||
is specified using whatever key fields are required. There is no restriction
|
||
on which physical file the key fields are in. However, if a key field exists
|
||
in other than the primary file of a join specification, the system must make
|
||
a temporary copy of the joined records. The system must also build a keyed
|
||
sequence access path over the copied records before the query file is opened.
|
||
The key fields must exist in the format identified on the FORMAT parameter.</p>
|
||
<div class="section" id="rbafokfdf__rbafokfdfex1"><a name="rbafokfdf__rbafokfdfex1"><!-- --></a><h4 class="sectiontitle">Example: Specify key fields from different
|
||
files</h4><p>This example shows how to use a field in a secondary file
|
||
as a key field.</p>
|
||
<p>Assume that you already have a join logical file named
|
||
JOINLF. FILEX is specified as the primary file and is joined to FILEY. You
|
||
want to process the records in JOINLF by the <em>Descrp</em> field which is
|
||
in FILEY.</p>
|
||
<p>Assume that the file record formats contain the
|
||
following fields:</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="bottom" width="33.33333333333333%" id="d0e50">FILEX</th>
|
||
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e52">FILEY</th>
|
||
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e54">JOINLF</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e50 ">Item</td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e52 ">Item</td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e54 ">Item</td>
|
||
</tr>
|
||
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e50 ">Qty</td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e52 ">Descrp</td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e54 ">Qty</td>
|
||
</tr>
|
||
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e50 "> </td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e52 "> </td>
|
||
<td align="left" valign="top" width="33.33333333333333%" headers="d0e54 ">Descrp</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</td></tr></table>
|
||
<div class="p">You can specify: <pre>OVRDBF FILE(JOINLF) SHARE(*YES)
|
||
OPNQRYF FILE(JOINLF) KEYFLD(DESCRP)
|
||
CALL PGM(PGMC)
|
||
CLOF OPNID(JOINLF)
|
||
DLTOVR FILE(JOINLF)</pre>
|
||
</div>
|
||
<div class="p">If you want to arrange the records
|
||
by <em>Qty</em> in <em>Descrp</em> (<em>Descrp</em> is the primary key field and <em>Qty</em> is
|
||
a secondary key field) you can specify: <pre>OPNQRYF FILE(JOINLF) KEYFLD(DESCRP QTY)</pre>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodynrs.htm" title="Dynamic record selection allows you to request a subset of the records in a file without using data description specifications (DDS).">Select records without using DDS</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |