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

81 lines
5.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="Externally and program-described data" />
<meta name="abstract" content="Programs can use either externally described or program-described files." />
<meta name="description" content="Programs can use either externally described or program-described files." />
<meta name="DC.Relation" scheme="URI" content="rbafodeffi.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="rbafoxpdd" />
<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>Externally and program-described data</title>
</head>
<body id="rbafoxpdd"><a name="rbafoxpdd"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Externally and program-described data</h1>
<div><p>Programs can use either externally described or program-described
files.</p>
<div class="p">Programs can use file descriptions in two ways: <ul><li>The program uses the field-level descriptions that are part of the file.
Because the field descriptions are external to the program itself, the data
is called externally described data.</li>
<li>The program uses fields that are described in the program itself; therefore,
the data is called program-described data. Fields in files that are only described
to the record level must be described in the program using the file.</li>
</ul>
</div>
<p>However, if you choose to describe a file to the field level, the system
can do more for you. For example, when you compile your programs, the system
can extract information from an externally described file and automatically
include field information in your programs. Therefore, you do not have to
code the field information in each program that uses the file.</p>
<p>The following figure shows the typical relationships between files and
programs on the <span class="keyword">iSeries™</span> server:</p>
<br /><img src="rbafo500.gif" alt="Examples of files" /><br /><dl><dt class="dlterm"><span class="uicontrol">1</span> Externally Described Data</dt>
<dd>The program uses the field-level description of a file that is defined
to the system. At compilation time, the language compiler copies the external
description of the file into the program.</dd>
<dt class="dlterm"><span class="uicontrol">2</span> Program-Described Data</dt>
<dd>The program uses a file that is described to the field level to the system,
but it does not use the actual field descriptions. At compilation time, the
language compiler does not copy the external description of the file into
the program. The fields in the file are described in the program. In this
case, the field attributes (for example, field length) used in the program
must be the same as the field attributes in the external description.</dd>
<dt class="dlterm"><span class="uicontrol">3</span> Program-Described Data</dt>
<dd>The program uses a file that is described only to the record level to
the system. The fields in the file must be described in the program.</dd>
</dl>
<p>Externally described files can also be described in a program. You might
want to use this method for compatibility with previous systems. For example,
you want to run programs on the <span class="keyword">iSeries</span> server
that originally came from a traditional file system. Those programs use program-described
data, and the file itself is only described to the record level. At a later
time, you describe the file to the field level (externally described file)
to use more of the database functions available on the system. Your old programs,
containing program-described data, can continue to use the externally described
file while new programs use the field-level descriptions that are part of
the file. Over time, you can change one or more of your old programs to use
the field-level descriptions.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodeffi.htm" title="This topic discusses the ways to describe records in database files.">How database files are described</a></div>
</div>
</div>
</body>
</html>