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

103 lines
6.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="Example: Describe a logical file using DDS" />
<meta name="abstract" content="This example shows how to describe a logical file using DDS." />
<meta name="description" content="This example shows how to describe a logical file using DDS." />
<meta name="DC.subject" content="example, describing, logical files using DDS, logical file, with DDS, example, DDS (data description specifications), logical file, example, data description specifications (DDS), logical file, example, UNIQUE (Unique) keyword, using, keyword, DDS, UNIQUE (Unique)" />
<meta name="keywords" content="example, describing, logical files using DDS, logical file, with DDS, example, DDS (data description specifications), logical file, example, data description specifications (DDS), logical file, example, UNIQUE (Unique) keyword, using, keyword, DDS, UNIQUE (Unique)" />
<meta name="DC.Relation" scheme="URI" content="rbafodescdds.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafosharf.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafologif.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="rbafoexdlog" />
<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>Example: Describe a logical file using DDS</title>
</head>
<body id="rbafoexdlog"><a name="rbafoexdlog"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Describe a logical file using DDS</h1>
<div><p>This example shows how to describe a logical file using DDS.</p>
<div class="section"><div class="p">The DDS for a logical file, shown in the next example, must be
in the following order: <dl><dt class="dlterm">1</dt>
<dd>File-level entries (optional). In this example, the UNIQUE
keyword indicates that for this file the key value for each record must be
unique; no duplicate key values are allowed.</dd>
</dl>
</div>
</div>
<div class="section"><div class="p">For each record format: <dl><dt class="dlterm">2</dt>
<dd>Record format level entries. In this example, the record format name,
the associated physical file, and an optional text description are specified.</dd>
<dt class="dlterm">3</dt>
<dd>Field-level entries (optional). In this example, each field name used
in the record format is specified.</dd>
<dt class="dlterm">4</dt>
<dd>Key field level entries (optional). In this example, the <em>Order</em> field
is used as a key field.</dd>
<dt class="dlterm">5</dt>
<dd>Select/omit field level entries (optional). In this example, all records
whose <em>Opnsts</em> field contains a value of N are omitted from the file's
access path. That is, programs reading records from this file will never see
a record whose <em>OPNSTS</em> field contains an N value.</dd>
<dt class="dlterm">6</dt>
<dd>Comment.</dd>
</dl>
</div>
</div>
<div class="example"> <pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A* ORDER HEADER FILE (ORDHDRP)
A <strong>6</strong>
A <strong>1</strong> UNIQUE
A <strong>2</strong> R ORDHDR PFILE(ORDHDRP)
A <strong>3</strong> ORDER TEXT('Order number')
A CUST TEXT('Customer number')
A .
A .
A .
A <strong>4</strong> K ORDER
A O OPNSTS <strong>5</strong> CMP(EQ 'N')
A S ALL</pre>
</div>
<div class="section"><p>A
logical file must be created after all physical files on which it is based
are created. The PFILE keyword in the previous example is used to specify
the physical file or files on which the logical file is based.</p>
</div>
<div class="section"><div class="p">Record formats in a logical file can be: <ul><li>A new record format based on fields from a physical file</li>
<li>The same record format as in a previously described physical or logical
file.</li>
</ul>
</div>
</div>
<div class="section"><p>Fields in the logical file record format must either appear in
the record format of at least one of the physical files or be derived from
the fields of the physical files on which the logical file is based.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodescdds.htm" title="When you describe a database file using data description specifications (DDS), you can describe information at the file, record-format, join, field, key, and select/omit levels.">Describe database files using DDS</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbafosharf.htm" title="A record format can be described once in either a physical or a logical file (except a join logical file) and can be used by many files. When you describe a new file, you can specify that the record format of an existing file is to be used by the new file.">Share existing record format descriptions in a database file</a></div>
<div><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>
</body>
</html>