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

119 lines
7.6 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="Effects of changing fields in a file description" />
<meta name="abstract" content="The system uses the information in the record format description to determine the level identifier. Changes to the fields in a file description cause the level identifier to change. Changes in key fields or select/omit fields might cause unexpected results in programs using the new access path." />
<meta name="description" content="The system uses the information in the record format description to determine the level identifier. Changes to the fields in a file description cause the level identifier to change. Changes in key fields or select/omit fields might cause unexpected results in programs using the new access path." />
<meta name="DC.subject" content="field, changing in a file description, effects of" />
<meta name="keywords" content="field, changing in a file description, effects of" />
<meta name="DC.Relation" scheme="URI" content="rbafochgfile.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/dspffd.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/dspfd.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/chgpf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/chglf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/ovrdbf.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="rbafoecffd" />
<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>Effects of changing fields in a file description</title>
</head>
<body id="rbafoecffd"><a name="rbafoecffd"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Effects of changing fields in a file description</h1>
<div><p> The system uses the information in the record format description
to determine the level identifier. Changes to the fields in a file description
cause the level identifier to change. Changes in key fields or select/omit
fields might cause unexpected results in programs using the new access path. </p>
<p>When a program that uses externally described data is compiled, the compiler
copies the file descriptions of the files into the compiled program. When
you run the program, the system can verify that the record formats the program
was compiled with are the same as the record formats currently defined for
the file. The default is to do level checking. The system assigns a unique
level identifier for each record format when the file it is associated with
is created. The system uses the information in the record format description
to determine the level identifier. This information includes the total length
of the record format, the record format name, the number and order of fields
defined, the data type, the size of the fields, the field names, the number
of decimal positions in the field, and whether the field allows the null value.
Changes to this information in a record format cause the level identifier
to change.</p>
<div class="p">The following DDS information has no effect on the level identifier and,
therefore, can be changed without recompiling the program that uses the file: <ul><li>TEXT keyword</li>
<li>COLHDG keyword</li>
<li>CHECK keyword</li>
<li>EDTCDE keyword</li>
<li>EDTWRD keyword</li>
<li>REF keyword</li>
<li>REFFLD keyword</li>
<li>CMP, RANGE, and VALUES keywords</li>
<li>TRNTBL keyword</li>
<li>REFSHIFT keyword</li>
<li>DFT keyword</li>
<li>CCSID keyword</li>
<li>Join specifications and join keywords</li>
<li>Key fields</li>
<li>Access path keywords</li>
<li>Select/omit fields</li>
</ul>
</div>
<p>Keep in mind that even though changing key fields or select/omit fields
does not cause a level check, the change might cause unexpected results in
programs using the new access path. For example, changing the key field from
the customer number to the customer name changes the order in which the records
are retrieved, and might cause unexpected problems in the programs processing
the file.</p>
<p>If level checking is specified (or defaulted to), the level identifier
of the file to be used is compared to the level identifier of the file in
your program when the file is opened. If the identifiers differ, a message
is sent to the program to identify the changed condition and the changes might
affect your program. You can compile your program again so that the changes
are included.</p>
<p>An alternative is to display the file description to determine if the changes
affect your program. You can use the Display File Field Description (DSPFFD)
command to display the description or, if you have source entry utility (SEU),
you can display the source file containing the DDS for the file.</p>
<p>The format level identifier defined in the file can be displayed by the
Display File Description (DSPFD) command. When you are displaying
the level identifier, remember that the record format identifier is compared,
rather than the file identifier.</p>
<p>Not every change in a file necessarily affects your program. For example,
if you add a field to the end of a file and your program does not use the
new field, you do not have to recompile your program. If the changes do not
affect your program, you can use the Change Physical File (CHGPF) or the Change
Logical File (CHGLF) command with LVLCHK(*NO) specified to turn off level
checking for the file, or you can enter an Override with Database File (OVRDBF)
command with LVLCHK(*NO) specified so that you can run your program without
level checking.</p>
<p>Keep in mind that level checking is the preferred method of operating.
The use of LVLCHK(*YES) is a good database integrity practice. The results
produced by LVLCHK(*NO) cannot always be predicted.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafochgfile.htm" title="These topics discuss how to change the database file descriptions and attributes. Considerations for changing fields in a file description are also included.">Change database file descriptions and attributes</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../cl/dspffd.htm">Display File Field Description (DSPFFD) command</a></div>
<div><a href="../cl/dspfd.htm">Display File Description (DSPFD) command</a></div>
<div><a href="../cl/chgpf.htm">Change Physical File (CHGPF) command</a></div>
<div><a href="../cl/chglf.htm">Change Logical File (CHGLF) command</a></div>
<div><a href="../cl/ovrdbf.htm">Override with Database File (OVRDBF) command</a></div>
</div>
</div>
</body>
</html>