105 lines
6.4 KiB
HTML
105 lines
6.4 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="Describe fields that never appear in the record format (example 5)" />
|
|
<meta name="abstract" content="Neither fields, which (N specified in position 38) can be used in join logical file for neither input nor output, are not included in the record format. This example shows how to describe such fields that never appear in the record format." />
|
|
<meta name="description" content="Neither fields, which (N specified in position 38) can be used in join logical file for neither input nor output, are not included in the record format. This example shows how to describe such fields that never appear in the record format." />
|
|
<meta name="DC.subject" content="field, describing, fields that never appear in record format, example, example, fields that never appear in record format" />
|
|
<meta name="keywords" content="field, describing, fields that never appear in record format, example, example, fields that never appear in record format" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafojnlof.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="rbafonflds" />
|
|
<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>Describe fields that never appear in the record format (example 5)</title>
|
|
</head>
|
|
<body id="rbafonflds"><a name="rbafonflds"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Describe fields that never appear in the record format (example 5)</h1>
|
|
<div><p>Neither fields, which (N specified in position 38) can be used
|
|
in join logical file for neither input nor output, are not included in the
|
|
record format. This example shows how to describe such fields that never appear
|
|
in the record format.</p>
|
|
<div class="section"><p>Programs using the join logical file cannot see or read neither
|
|
fields. Neither fields are not included in the record format. Neither fields
|
|
cannot be key fields or used in select/omit statements in the joined file.
|
|
You can use a neither field for a join field (specified at the join specification
|
|
level on the JFLD keyword) that is redefined at the record level only to allow
|
|
the join operation, but is not needed or wanted in the program.</p>
|
|
<p>In the
|
|
following example, the program reads the descriptions, prices, and quantity
|
|
on hand of parts in stock. The part numbers themselves are not wanted except
|
|
to bring together the records of the parts. However, because the part numbers
|
|
have different attributes, at least one must be redefined.</p>
|
|
</div>
|
|
<div class="section"><br /><img src="rbafo528.gif" alt="Examples of records" /><br /></div>
|
|
<div class="section"><p>The join logical file (JLF) has fields <em>Description</em>, <em>Price</em>,
|
|
and <em>Quantity on hand</em>. Physical file 1 (PF1) has <em>Description</em> and <em>Part
|
|
number</em>, while physical file 2 (PF2) has <em>Part number</em>, <em>Price</em>,
|
|
and <em>Quantity on hand</em>. The data description specifications (DDS) for
|
|
these files are shown as follows:</p>
|
|
</div>
|
|
<div class="example"> <pre><strong>JLF</strong>
|
|
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R JOINREC JFILE(PF1 PF2)
|
|
A J JOIN(PF1 PF2)
|
|
A JFLD(PRTNBR PRTNBR)
|
|
A PRTNBR S N JREF(1)
|
|
A DESC
|
|
A PRICE
|
|
A QUANT
|
|
A K DESC
|
|
A
|
|
|
|
<strong>PF1</strong>
|
|
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R REC1
|
|
A DESC 30
|
|
A PRTNBR 6P 0
|
|
A
|
|
|
|
<strong>PF2</strong>
|
|
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R REC2
|
|
A PRTNBR 6S 0
|
|
A PRICE 7 2
|
|
A QUANT 8 0
|
|
A</pre>
|
|
</div>
|
|
<div class="section"><p>In PF1, the <em>Prtnbr</em> field is a packed decimal field; in
|
|
PF2, the <em>Prtnbr</em> field is a zoned decimal field. In the join logical
|
|
file, they are used as join fields, and the <em>Prtnbr</em> field from PF1 is
|
|
redefined to be a zoned decimal field by specifying an S in position 35 at
|
|
the field level. The JREF keyword identifies which physical file the field
|
|
comes from. However, the field is not included in the record format; therefore,
|
|
N is specified in position 38 to make it a neither field. A program using
|
|
this file would not see the field.</p>
|
|
</div>
|
|
<div class="section"><p>In this example, a sales clerk can type a description of a part.
|
|
The program can read the join logical file for a match or a close match, and
|
|
display one or more parts for the user to examine, including the description,
|
|
price, and quantity. This application assumes that part numbers are not necessary
|
|
to complete a customer order or to order more parts for the warehouse.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafojnlof.htm" title="These topics provide examples to illustrate how to set up a join logical file. Performance, integrity, and a summary of rules for join logical files are also included.">Set up a join logical file</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |