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

138 lines
8.1 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="When to specify REF and REFFLD keywords for DDS files" />
<meta name="abstract" content="This topic provides information to help you decide if you want to specify the REF (reference) or REFFLD (referenced field) keyword or both. It also tells you how to specify parameter values for each REF or REFFLD keyword you specify." />
<meta name="description" content="This topic provides information to help you decide if you want to specify the REF (reference) or REFFLD (referenced field) keyword or both. It also tells you how to specify parameter values for each REF or REFFLD keyword you specify." />
<meta name="DC.subject" content="REFFLD keyword, REF keyword, when to specify REF and REFFLD keywords, specifying REF and REFFLD keywords" />
<meta name="keywords" content="REFFLD keyword, REF keyword, when to specify REF and REFFLD keywords, specifying REF and REFFLD keywords" />
<meta name="DC.Relation" scheme="URI" content="kickoff.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="specref" />
<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>When to specify REF and REFFLD keywords for DDS files</title>
</head>
<body id="specref"><a name="specref"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">When to specify REF and REFFLD keywords for DDS files</h1>
<div><p>This topic provides information to help you decide if you want
to specify the REF (reference) or REFFLD (referenced field) keyword or both.
It also tells you how to specify parameter values for each REF or REFFLD
keyword you specify.</p>
<p>You must specify R in position 29 for each field that refers to another
field that was previously defined.</p>
<p>Answer the following questions to determine which keyword to use: </p>
<ul><li>REF or REFFLD or both? <p>If all or most of the fields you refer to are
defined REF at the file level.</p>
<div class="p">Specify REFFLD for every field you reference:
<ul><li>That is not in the file you specify on the REF keyword. <p>or</p>
</li>
<li>Whose name differs from the name of the field it references. This includes
fields that reference fields in the file you are defining.</li>
</ul>
</div>
</li>
<li>Do you need a database file name for each REFFLD keyword you specify?
<p>The database file name specified on a REFFLD keyword overrides the database
file name specified on the REF keyword.</p>
<div class="p">On the REFFLD keyword, you
can specify: <ul><li>*SRC so that the <span class="keyword">i5/OS™</span> operating
system searches the file you are defining for the referenced field. The referenced
field must be defined before you define the field that references it.</li>
<li>The name of the database file that the <span class="keyword">i5/OS</span> operating system is to search
through to find the referenced field.</li>
</ul>
</div>
<p>If you do not specify *SRC or a database file name on the REFFLD
keyword, the default is *SRC if the REF keyword is not specified. If the
REF keyword is specified, the default is the database file name specified
on the REF keyword.</p>
</li>
<li>Is a library name necessary for each database file you specify? <p>If the job that will create the file you are defining
(perhaps your interactive job) has a library list, and the database file you
specified is on the library list, enter only the file name (FILE1). Otherwise,
specify the file name qualified by the library name (LIB1/FILE1).</p>
</li>
<li>Do you need a record format name for each REF or REFFLD keyword you specify?
<p>If the file you reference has only one record format, do not specify a
record format name.</p>
<p>If it has more than one record format, specify
a record format name.</p>
</li>
</ul>
<p>The following example illustrates reference function specifications. It
is not a valid example of any file except an ICF file. Display and printer
files must have a location specified for each field. Physical files can have
only one record format. The REF and REFFLD keywords are not allowed in logical
files.</p>
<div class="fignone" id="specref__g1"><a name="specref__g1"><!-- --></a><span class="figcap">Figure 1. Sample Reference Function Specifications</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A REF(FILE1) <strong>(1)</strong>
00020A R RECORD1
00030A FIELD1 R <strong>(1)</strong>
00040A FIELD2 R <strong>(1)</strong>
00050A FIELD3 R REFFLD(FLD3) <strong>(2)</strong>
00060A FIELD4 R REFFLD(FLD4 FILE2) <strong>(3)</strong>
00070A FIELD5 R REFFLD(FLD5 LIB1/FILE3) <strong>(4)</strong>
00080A FIELD6 R REFFLD(RECORDB/FLD6 LIB1/FILE4) <strong>(5)</strong>
00090A FIELD7 R REFFLD(FIELD6 *SRC) <strong>(6)</strong>
00100A FIELD8 R REFFLD(FLD6) <strong>(7)</strong>
00110A R RECORD2
00120A FIELD1 20 <strong>(8)</strong>
00130A
00140A R RECORD3
00150A FIELD1 R REFFLD(RECORD2/FIELD1 *SRC) <strong>(9)</strong>
00160A
00170A R RECORD4
00180A FIELD1 R REFFLD(FIELD1 *SRC) <strong>(10)</strong>
A</pre>
<div class="note"><span class="notetitle">Note:</span> For line 00010, you can also specify library name and record format
name. See the REF keyword example.</div>
</div>
<div class="p"><strong>Legend: </strong> <dl><dt class="dlterm"><span>1</span></dt>
<dd>FIELD1 and FIELD2 have the same attributes as FIELD1 and FIELD2 in FILE1.</dd>
<dt class="dlterm"><span>2</span></dt>
<dd>FIELD3 has the same attributes as FLD3 in FILE1.</dd>
<dt class="dlterm"><span>3</span></dt>
<dd>FIELD4 has the same attributes as FLD4 in FILE2.</dd>
<dt class="dlterm"><span>4</span></dt>
<dd>FIELD5 has the same attributes as FLD5 in FILE3 in LIB1.</dd>
<dt class="dlterm"><span>5</span></dt>
<dd>FIELD6 has the same attributes as FLD6 in record format RECORDB in FILE4
in LIB1.</dd>
<dt class="dlterm"><span>6</span></dt>
<dd>FIELD7 has the same attributes as FIELD6 (on the preceding line in this
file).</dd>
<dt class="dlterm"><span>7</span></dt>
<dd>FIELD8 has the same attributes as FLD6 in FILE1.</dd>
<dt class="dlterm"><span>8</span></dt>
<dd>FIELD1 in RECORD2 has unique field attributes. (It does not use the reference
function; notice that R is not specified in position 29.)</dd>
<dt class="dlterm"><span>9</span></dt>
<dd>FIELD1 in RECORD3 has the same attributes as FIELD1 in RECORD2.</dd>
<dt class="dlterm"><span>10</span></dt>
<dd>FIELD1 in RECORD4 has the same attributes as FIELD1 in RECORD1.</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="kickoff.htm" title="This topic provides an overview of data description specifications (DDS) on iSeries servers.">DDS concepts</a></div>
</div>
</div>
</body>
</html>