ibm-information-center/dist/eclipse/plugins/i5OS.ic.dds_5.4.0.1/logfilejoinexamp.htm

97 lines
5.9 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="concept" />
<meta name="DC.Title" content="Example: A join logical file" />
<meta name="abstract" content="The join logical file joins three physical files (PF1, PF2, and PF3) in this example, so that an application program can get name, address, and salary information in one input operation, even though the information is stored in three different physical files." />
<meta name="description" content="The join logical file joins three physical files (PF1, PF2, and PF3) in this example, so that an application program can get name, address, and salary information in one input operation, even though the information is stored in three different physical files." />
<meta name="DC.subject" content="examples of DDS, join logical file" />
<meta name="keywords" content="examples of DDS, join logical file" />
<meta name="DC.Relation" scheme="URI" content="rbafpmstexamp.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="logfilejoinexamp" />
<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>Example: A join logical file</title>
</head>
<body id="logfilejoinexamp"><a name="logfilejoinexamp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: A join logical file</h1>
<div><p>The join logical file joins three physical files (PF1, PF2, and
PF3) in this example, so that an application program can get name, address,
and salary information in one input operation, even though the information
is stored in three different physical files. </p>
<div class="p">The following keywords are important in the example: <ul><li>JFILE</li>
<li>JFLD</li>
<li>JOIN</li>
<li>JREF</li>
</ul>
</div>
<div class="fignone" id="logfilejoinexamp__o6"><a name="logfilejoinexamp__o6"><!-- --></a><span class="figcap">Figure 1. DDS for a join logical file</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A <strong>(1)</strong>R JOINREC <strong>(2)</strong> JFILE(PF1 PF2 PF3)
00020A J JOIN(PF1 PF2)
00030A <strong>(3)</strong> JFLD(NAME NAME)
00040A J JOIN(PF2 PF3)
00050A JFLD(NAME NAME)
00060A <strong>(4)</strong> NAME <strong>(5)</strong> JREF(1)
00070A <strong>(4)</strong> ADDR
00080A <strong>(4)</strong> PHONE
00090A <strong>(4)</strong> SALARY
A</pre>
</div>
<div class="p"><strong>Legend: </strong> <dl><dt class="dlterm">(1)</dt>
<dd>R identifies the record format. There can be only one record format in
a join logical file.</dd>
<dt class="dlterm">(2)</dt>
<dd>The JFILE keyword specifies that PF1, PF2, and PF3 are the physical files
on which this join logical file is based. Because it is specified first,
PF1 is the primary file. There are two secondary files: PF2 and PF3.</dd>
<dt class="dlterm">(3)</dt>
<dd>J identifies the join specifications. With two secondary files in this
join logical file, there must be two join specifications. Each join specification
defines how a pair of files is to be joined, as follows: <ul><li>JOIN is required when more than two physical files are being joined, and
it identifies which two files are being joined in this join specification.
In the first join specification, PF1 and PF2 are joined. In the second join
specification, PF2 and PF3 are joined.</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> Secondary files can be joined to either the
primary file or to another secondary file. In this example, PF2 in the second
JOIN keyword can be PF1. There is no difference in the order
of records supplied to the program or in performance.</div>
<ul><li>JFLD identifies which fields are used to link together records from the
physical files being joined. In the first join specification, NAME from PF1
links with NAME from PF2. In the second join specification, NAME from PF2
links with NAME from PF3.</li>
</ul>
</dd>
<dt class="dlterm">(4)</dt>
<dd>The field names show which fields are presented to the program. At least
one field name is required.</dd>
<dt class="dlterm">(5)</dt>
<dd>The JREF keyword identifies which physical file to search for the field
name; in this example, NAME from PF1 is used. Note the use of the direct
file number: JREF(1) indicates to use the first file on the JFILE keyword,
which is PF1.</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafpmstexamp.htm" title="This topic provides examples of data description specifications (DDS) for each type of file discussed in this topic. If you choose, you can use the examples in this topic with appropriate high-level language programs.">Examples: DDS for each file type</a></div>
</div>
</div>
</body>
</html>