165 lines
9.3 KiB
HTML
165 lines
9.3 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="JDFTVAL (Join Default Values) keyword—join logical files only" />
|
|
<meta name="abstract" content="Use this file-level keyword in a join logical file so the system provides default values for fields when a join to a secondary file does not produce any records. JDFTVAL is valid only for join logical files." />
|
|
<meta name="description" content="Use this file-level keyword in a join logical file so the system provides default values for fields when a join to a secondary file does not produce any records. JDFTVAL is valid only for join logical files." />
|
|
<meta name="DC.subject" content="JDFTVAL (Join Default Values) keyword, Join Default Values (JDFTVAL) keyword" />
|
|
<meta name="keywords" content="JDFTVAL (Join Default Values) keyword, Join Default Values (JDFTVAL) keyword" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstpdft.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="tdjdftv" />
|
|
<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, JDFTVAL</title>
|
|
</head>
|
|
<body id="tdjdftv"><a name="tdjdftv"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">JDFTVAL (Join Default Values) keyword—join logical files only</h1>
|
|
<div><p>Use this file-level keyword in a join logical file so the system
|
|
provides default values for fields when a join to a secondary file does not
|
|
produce any records. JDFTVAL is valid only for join logical files.</p>
|
|
<div class="section"><p>This keyword has no parameters.</p>
|
|
<p>The default values for the
|
|
system are blanks for character and hexadecimal fields and zeros for numeric
|
|
fields. You can change the default for specific fields by specifying the
|
|
DFT keyword for the fields in the physical file.</p>
|
|
<p>If you specify JDFTVAL,
|
|
your program retrieves records for which a secondary file does not have a
|
|
corresponding record. If you do not specify JDFTVAL, a record in the primary
|
|
file for which there is no corresponding record in a secondary file is skipped.</p>
|
|
<p>If
|
|
you are joining three or more files, and you specify the JDFTVAL keyword for
|
|
fields used as join fields, default values of fields missing in secondary
|
|
files are used in the same way that a field value is used. For example, records
|
|
are selected and omitted based on the default value. Also, if this field is
|
|
used as a join field to join to other secondary files, records from the other
|
|
secondary files are returned to your program based on the default value.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
|
|
the JDFTVAL keyword.</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
00010A JDFTVAL
|
|
00020A R RECORD1 JFILE(PF1 PF2)
|
|
00030A J JOIN(PF1 PF2)
|
|
00040A JFLD(NAME NAME)
|
|
00050A NAME JREF(1)
|
|
00060A ADDR
|
|
00070A BAL
|
|
A</pre>
|
|
<p>PF1 is the primary file and PF2 is a secondary file.
|
|
Assume 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="d0e49">PF1 NAME</th>
|
|
<th valign="top" width="40%" id="d0e51">ADDR</th>
|
|
<th valign="top" width="20%" id="d0e53">PF2 NAME</th>
|
|
<th valign="top" width="20%" id="d0e55">BAL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="20%" headers="d0e49 ">Anne</td>
|
|
<td valign="top" width="40%" headers="d0e51 ">120 1st St.</td>
|
|
<td valign="top" width="20%" headers="d0e53 ">Anne</td>
|
|
<td valign="top" width="20%" headers="d0e55 ">5.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e49 ">Doug</td>
|
|
<td valign="top" width="40%" headers="d0e51 ">40 Pillsbury</td>
|
|
<td valign="top" width="20%" headers="d0e53 ">Doug</td>
|
|
<td valign="top" width="20%" headers="d0e55 ">6.50</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e49 ">Mark</td>
|
|
<td valign="top" width="40%" headers="d0e51 ">2 Lakeside Dr.</td>
|
|
<td valign="top" width="20%" headers="d0e53 ">Sue</td>
|
|
<td valign="top" width="20%" headers="d0e55 ">2.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="20%" headers="d0e49 ">Sue</td>
|
|
<td valign="top" width="40%" headers="d0e51 ">120 Broadway</td>
|
|
<td valign="top" width="20%" headers="d0e53 "> </td>
|
|
<td valign="top" width="20%" headers="d0e55 "> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>With JDFTVAL specified in the join logical file, the program reads
|
|
the following records (shown in arrival sequence):</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="33.33333333333333%" id="d0e101">NAME</th>
|
|
<th valign="top" width="33.33333333333333%" id="d0e103">ADDR</th>
|
|
<th valign="top" width="33.33333333333333%" id="d0e105">BAL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e101 ">Anne</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e103 ">120 1st St.</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e105 ">5.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e101 ">Doug</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e103 ">40 Pillsbury</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e105 ">6.50</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e101 ">Mark</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e103 ">2 Lakeside Dr.</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e105 ">0.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e101 ">Sue</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e103 ">120 Broadway</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e105 ">2.00</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>Without JDFTVAL specified in the join logical file, the program
|
|
can read only three records (no record is found for Mark).</p>
|
|
<p>In this example,
|
|
if you specified JREF(2) instead of JREF(1), the records returned to the program
|
|
might be different, 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="33.33333333333333%" id="d0e147">NAME</th>
|
|
<th valign="top" width="33.33333333333333%" id="d0e149">ADDR</th>
|
|
<th valign="top" width="33.33333333333333%" id="d0e151">BAL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e147 ">Anne</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e149 ">120 1st St.</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e151 ">5.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e147 ">Doug</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e149 ">40 Pillsbury</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e151 ">6.50</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e147 "> </td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e149 ">2 Lakeside Dr.</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e151 ">0.00</td>
|
|
</tr>
|
|
<tr><td valign="top" width="33.33333333333333%" headers="d0e147 ">Sue</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e149 ">120 Broadway</td>
|
|
<td valign="top" width="33.33333333333333%" headers="d0e151 ">2.00</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</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 class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="rzakbmstpdft.htm" title="Use this field-level keyword to specify a default value for a field.">DFT (Default) keyword—physical files only</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |