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

186 lines
10 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="JDUPSEQ (Join Duplicate Sequence) keyword—join logical files only" />
<meta name="abstract" content="Use this join-level keyword to specify the order in which records with duplicate join fields are presented when your program reads a join logical file." />
<meta name="description" content="Use this join-level keyword to specify the order in which records with duplicate join fields are presented when your program reads a join logical file." />
<meta name="DC.subject" content="JDUPSEQ (Join Duplicate Sequence) keyword, Join Duplicate Sequence (JDUPSEQ) keyword" />
<meta name="keywords" content="JDUPSEQ (Join Duplicate Sequence) keyword, Join Duplicate Sequence (JDUPSEQ) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.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="tdjdups" />
<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>Physical and Logical Files, JDUPSEQ</title>
</head>
<body id="tdjdups"><a name="tdjdups"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">JDUPSEQ (Join Duplicate Sequence) keyword—join logical files only</h1>
<div><p>Use this join-level keyword to specify the order in which records
with duplicate join fields are presented when your program reads a join logical
file.</p>
<div class="section"><div class="p">The format of the keyword is: <pre>JDUPSEQ(sequencing-field-name [*DESCEND])</pre>
</div>
<p>This
keyword has no effect on the ordering of unique records. If you do not specify
the keyword, the system does not guarantee the order in which records with
duplicate join fields are presented.</p>
<p>If more than one JDUPSEQ keyword
is specified in one join specification, the order in which you specify the
JDUPSEQ keywords determines the order of presentation of duplicate records.
This is similar to specifying an additional key field, in that it determines
the order in which records with duplicate keys are presented.</p>
<p>This keyword
is valid only for join logical files.</p>
<p>In a single join specification,
the total length of fields specified as <em>to</em> fields on the JFLD keyword
and fields specified on the JDUPSEQ keyword cannot exceed 120 bytes.</p>
<p>The
sequencing field name must be a field that (1) exists in the <em>to</em> file
for this join specification and (2) has not been specified as a <em>to</em> field
on the JFLD keyword for this join specification. The sequencing field name
can be a concatenated field or a SST field. The sequencing field name need
not be specified in the record format for the join logical file.</p>
<div class="p">Optionally,
you can specify *DESCEND to change the order in which duplicate records are
presented. Without *DESCEND, duplicate records are presented in the following
default sequences: <ul><li>Ascending signed order for a numeric sequencing field</li>
<li>Ascending order for a character sequencing field</li>
</ul>
</div>
</div>
<div class="example"><h4 class="sectiontitle">Examples</h4><p>The following example shows how to specify
the JDUPSEQ keyword.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R JREC JFILE(PF1 PF2)
00020A J JOIN(PF1 PF2)
00030A JFLD(NAME1 NAME2)
00040A JDUPSEQ(PHONE)
00050A NAME1
00060A ADDR
00070A PHONE</pre>
<p>This example assumes that PF1 and PF2
have the following records:</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="d0e68">PF1 NAME1</th>
<th valign="top" width="40%" id="d0e70">ADDR</th>
<th valign="top" width="20%" id="d0e72">PF2 NAME2</th>
<th valign="top" width="20%" id="d0e74">TELEPHONE</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="20%" headers="d0e68 ">Anne</td>
<td valign="top" width="40%" headers="d0e70 ">120 1st St.</td>
<td valign="top" width="20%" headers="d0e72 ">Anne</td>
<td valign="top" width="20%" headers="d0e74 ">555-1111</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e68 ">Doug</td>
<td valign="top" width="40%" headers="d0e70 ">40 Pillsbury</td>
<td valign="top" width="20%" headers="d0e72 ">Anne</td>
<td valign="top" width="20%" headers="d0e74 ">555-6666</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e68 ">Mark</td>
<td valign="top" width="40%" headers="d0e70 ">2 Lakeside Dr.</td>
<td valign="top" width="20%" headers="d0e72 ">Anne</td>
<td valign="top" width="20%" headers="d0e74 ">555-2222</td>
</tr>
<tr><td valign="top" width="20%" headers="d0e68 ">&nbsp;</td>
<td valign="top" width="40%" headers="d0e70 ">&nbsp;</td>
<td valign="top" width="20%" headers="d0e72 ">Doug</td>
<td valign="top" width="20%" headers="d0e74 ">555-5555</td>
</tr>
</tbody>
</table>
</div>
<p>There are three records for Anne in PF2, showing three telephone
numbers. With JDUPSEQ specified as shown, the records are returned 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="29.411764705882355%" id="d0e120">NAME</th>
<th valign="top" width="41.17647058823529%" id="d0e122">ADDR</th>
<th valign="top" width="29.411764705882355%" id="d0e124">TELEPHONE</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="29.411764705882355%" headers="d0e120 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e122 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e124 ">555-1111</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e120 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e122 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e124 ">555-2222</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e120 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e122 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e124 ">555-6666</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e120 ">Doug</td>
<td valign="top" width="41.17647058823529%" headers="d0e122 ">40 Pillsbury</td>
<td valign="top" width="29.411764705882355%" headers="d0e124 ">555-5555</td>
</tr>
</tbody>
</table>
</div>
<p>The JDUPSEQ keyword only affects the order of records when duplicates
exist.</p>
</div>
<div class="example"><p>The following example assumes that the logical file
is based on the same physical files as example 1. There are three records
for Anne in PF2, showing three telephone numbers.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R JREC JFILE(PF1 PF2)
00020A J JOIN(PF1 PF2)
00030A JFLD(NAME1 NAME2)
00040A JDUPSEQ(PHONE *DESCEND)
00050A NAME1
00060A ADDR
00070A PHONE
A</pre>
<p>When you specify JDUPSEQ with *DESCEND, the records are
returned 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="29.411764705882355%" id="d0e171">NAME1</th>
<th valign="top" width="41.17647058823529%" id="d0e173">ADDR</th>
<th valign="top" width="29.411764705882355%" id="d0e175">TELEPHONE</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="29.411764705882355%" headers="d0e171 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e173 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e175 ">555-6666</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e171 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e173 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e175 ">555-2222</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e171 ">Anne</td>
<td valign="top" width="41.17647058823529%" headers="d0e173 ">120 1st St.</td>
<td valign="top" width="29.411764705882355%" headers="d0e175 ">555-1111</td>
</tr>
<tr><td valign="top" width="29.411764705882355%" headers="d0e171 ">Doug</td>
<td valign="top" width="41.17647058823529%" headers="d0e173 ">40 Pillsbury</td>
<td valign="top" width="29.411764705882355%" headers="d0e175 ">555-5555</td>
</tr>
</tbody>
</table>
</div>
<p>The list shows Anne's telephone numbers in descending order.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakbmstlfkeyw.htm" title="This topic lists valid keyword entries for describing physical and logical files. They are typed in positions 45 through 80 (functions).">Keyword entries for physical and logical files (positions 45 through 80)</a></div>
</div>
</div>
</body>
</html>