ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakc_5.4.0.1/rzakcmstdfref.htm

94 lines
5.8 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="REF (Reference) keyword for display files" />
<meta name="abstract" content="Use this file-level keyword to specify the name of a file from which field descriptions are to be retrieved or when you want to duplicate descriptive information from several fields in a previously described record format." />
<meta name="description" content="Use this file-level keyword to specify the name of a file from which field descriptions are to be retrieved or when you want to duplicate descriptive information from several fields in a previously described record format." />
<meta name="DC.subject" content="REF (Reference) keyword" />
<meta name="keywords" content="REF (Reference) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstpos29.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="rzakcmstdfref" />
<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>REF (Reference) keyword for display files</title>
</head>
<body id="rzakcmstdfref"><a name="rzakcmstdfref"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">REF (Reference) keyword for display files</h1>
<div><p>Use this file-level keyword to specify the name of a file from
which field descriptions are to be retrieved or when you want to duplicate
descriptive information from several fields in a previously described record
format.</p>
<div class="section"><p>You can code the file name once here rather than on REFFLD keywords
with each of the field descriptions that refer to the file. To refer to more
than one file, use the REFFLD keyword. (REF can be specified only once.)</p>
<div class="p">The
format of the keyword is: <pre>REF([library-name/]database-file-name [record-format-name])</pre>
</div>
<p>If
there is more than one record format in the referenced file, specify a record
format name as a parameter value for this keyword to tell the <span class="keyword">i5/OS™</span> operating
system which one to use unless the record formats should be searched sequentially.</p>
<p>The
database-file-name is a required parameter for this keyword. The library-name
and the record-format-name are optional.</p>
<p>If you do not specify the library-name,
the current library list (*LIBL) at file creation time is used. If the record-format-name
is not specified, each record format is searched in order (as they are specified).
The first occurrence of the field name is used. See the <a href="../dds/specref.htm" target="_blank">When to specify REF
and REFFLD keywords for DDS files</a> topic for the search sequences determined
by your choice of REF and REFFLD keywords.</p>
<p>You can specify a distributed
data management (DDM) file on this keyword.</p>
<p>When using a DDM file, the
database-file-name and library-name are the DDM file and library names on
the source system. The record-format-name is the record format name in the
remote file on the target system.</p>
<div class="note"><span class="notetitle">Note:</span> IDDU files cannot be used as reference
files.</div>
<p>Option indicators are not valid for this keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Examples</h4><p>The following examples show how to specify
the REF keyword.</p>
<p>In this example, FLD1 has the same attributes as the
first (or only) FLD1 in FILE1.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A REF(FILE1)
00020A R RECORD
00030A FLD1 R 2 2
A</pre>
<p>In this example, FLD1 has the same attributes as FLD1
in RECORD2 in FILE1 in LIB1.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A REF(LIB/FILE1 RECORD2)
00020A R RECORD
00030A FLD1 R 2 2
A</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakcmstpos29.htm" title="You can specify R in this position to use the reference function of the i5/OS operating system to copy the attributes of a previously defined named field (called the referenced field) to the field you are defining.">Reference for display files (position 29)</a></div>
</div>
</div>
</body>
</html>