ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafodaplf.htm

94 lines
6.0 KiB
HTML
Raw Permalink 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="Describe access paths for logical files" />
<meta name="abstract" content="Use one of the ways to describe access paths for logical files." />
<meta name="description" content="Use one of the ways to describe access paths for logical files." />
<meta name="DC.subject" content="describing, access paths, for logical files, access path, describing logical files" />
<meta name="keywords" content="describing, access paths, for logical files, access path, describing logical files" />
<meta name="DC.Relation" scheme="URI" content="rbafologif.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafosorec.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoshrap.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstxcindx.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="rbafodaplf" />
<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 access paths for logical files</title>
</head>
<body id="rbafodaplf"><a name="rbafodaplf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Describe access paths for logical files</h1>
<div><p>Use one of the ways to describe access paths for logical files.</p>
<div class="p">The access path for a logical file record format can be specified in one
of the following ways:<ul><li class="liexpand">Keyed sequence access path specification. Specify key fields after the
last record or field-level specification. The key field names
must be in the record format. For join logical files, the key fields must
come from the first, or primary, physical file. <pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R CUSRCD PFILE(CUSMSTP)
A K ARBAL
A K CRDLMT
A</pre>
</li>
<li class="liexpand">Encoded vector access path specification. You define the encoded vector
access path with the SQL CREATE INDEX statement.</li>
<li class="liexpand">Arrival sequence access path specification. Specify no key fields. You
can specify only one physical file on the PFILE keyword (and only one of the
physical file's members when you add the logical file member). <pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R CUSRCD PFILE(CUSMSTP)
</pre>
</li>
<li class="liexpand">Previously
defined keyed-sequence access path specification (for simple and multiple
format logical files only). Specify the REFACCPTH keyword at the file level
to identify a previously created database file whose access path and select/omit
specifications are to be copied to this logical file. You cannot specify individual
key or select/omit fields with the REFACCPTH keyword. <div class="note"><span class="notetitle">Note:</span> Even though the
specified file's access path specifications are used, the system determines
which file's access path, if any, will actually be shared. The system always
tries to share access paths, regardless of whether the REFACCPTH keyword is
used.</div>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
REFACCPTH(DSTPRODLIB/ORDHDRL)
A R CUSRCD PFILE(CUSMSTP)
</pre>
</li>
</ul>
When you define a record format for a logical file that shares key field
specifications of another file's access path (using the DDS keyword, REFACCPTH),
you can use any fields from the associated physical file record format. These
fields do not have to be used in the file that describes the access path.
However, all key and select/omit fields used in the file that describes the
access path must be used in the new record format.</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafosorec.htm">Select and omit records using logical files</a></strong><br />
The system can select and omit records when using a logical file. This can help you exclude records in a file for processing convenience or for security.</li>
<li class="ulchildlink"><strong><a href="rbafoshrap.htm">Use existing access paths</a></strong><br />
When two or more files are based on the same physical files and the same key fields in the same order, they automatically share the same keyed sequence access path. When access paths are shared, the amount of system activity required to maintain access paths and the amount of auxiliary storage used by the files is reduced.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafologif.htm" title="These topics discuss some of the unique considerations for creating logical files.">Set up logical files</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../db2/rbafzmstxcindx.htm">CREATE INDEX</a></div>
</div>
</div>
</body>
</html>