ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3detectdesc.htm

100 lines
9.5 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="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<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="Detect file description changes" />
<meta name="abstract" content="When a program that uses externally described files is compiled, the high-level language compiler extracts the record-level and field-level descriptions for the files referred to in the program and makes those descriptions part of the compiled program. When you run the program, you can verify that the descriptions with which the program was compiled are the current descriptions." />
<meta name="description" content="When a program that uses externally described files is compiled, the high-level language compiler extracts the record-level and field-level descriptions for the files referred to in the program and makes those descriptions part of the compiled program. When you run the program, you can verify that the descriptions with which the program was compiled are the current descriptions." />
<meta name="DC.subject" content="file description, changes to, change, detecting file description, high-level language (HLL), compiler, record format, level checking, level checking, parameter, LVLCHK(*YES), LVLCHK (level check) parameter, *YES value, level check (LVLCHK) parameter, level identifier, command, CL, DSPFFD (Display File Field Description), Display File Field Description (DSPFFD) command, LVLCHK(*NO), file description changes, DSPFFD (Display File Field Description) command, Display File Field Description (DSPFFD), file field description, displaying, source entry utility (SEU), SEU (source entry utility), source file, file, source, displaying, source files, SEU (source entry utility), Display File Description (DSPFD) command, format level identifier, DSPFD (Display File Description), DSPFD (Display File Description) command, DSPFD (Display File Description), Display File Description (DSPFD), command, CL, DSPPGMREF (Display Program References), Display Program References (DSPPGMREF) command, DSPPGMREF (Display Program References) command, Display Program References (DSPPGMREF) command, DSPPGMREF (Display Program References), Display Program References (DSPPGMREF), program reference, program references, externally described file, high-level language compiler" />
<meta name="keywords" content="file description, changes to, change, detecting file description, high-level language (HLL), compiler, record format, level checking, level checking, parameter, LVLCHK(*YES), LVLCHK (level check) parameter, *YES value, level check (LVLCHK) parameter, level identifier, command, CL, DSPFFD (Display File Field Description), Display File Field Description (DSPFFD) command, LVLCHK(*NO), file description changes, DSPFFD (Display File Field Description) command, Display File Field Description (DSPFFD), file field description, displaying, source entry utility (SEU), SEU (source entry utility), source file, file, source, displaying, source files, SEU (source entry utility), Display File Description (DSPFD) command, format level identifier, DSPFD (Display File Description), DSPFD (Display File Description) command, DSPFD (Display File Description), Display File Description (DSPFD), command, CL, DSPPGMREF (Display Program References), Display Program References (DSPPGMREF) command, DSPPGMREF (Display Program References) command, Display Program References (DSPPGMREF) command, DSPPGMREF (Display Program References), Display Program References (DSPPGMREF), program reference, program references, externally described file, high-level language compiler" />
<meta name="DC.Relation" scheme="URI" content="rbal3open.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3detectdesc" />
<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>Detect file description changes</title>
</head>
<body id="rbal3detectdesc"><a name="rbal3detectdesc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Detect file description changes</h1>
<div><p>When a program that uses externally described files is compiled,
the high-level language compiler extracts the record-level and field-level
descriptions for the files referred to in the program and makes those descriptions
part of the compiled program. When you run the program, you can verify that
the descriptions with which the program was compiled are the current descriptions.</p>
<div class="p">The server assigns a unique level identifier for each record format when
it creates the associated file. The server uses the following information
to determine the level identifier: <ul><li>Record format name</li>
<li>Field name</li>
<li>Total length of the record format</li>
<li>Number of fields in the record format</li>
<li>Field attributes (for example, length and decimal positions)</li>
<li>Order of the field in the record format</li>
</ul>
</div>
<div class="note"><span class="notetitle">Note:</span> It is possible for files with large record formats (many fields) to
have the same format level identifiers even though their formats might be slightly
different. Problems can occur when copying these files if the record format
names of the from-file and the to-file are the same.</div>
<p>Display, printer, and ICF files can also use the number of and order of
special fields called indicators to determine the level identifier.</p>
<p>If you change the DDS for a record format and change any of the items in
the preceding list, the level identifier changes.</p>
<p>To check the record format identifiers when you run the program, specify
LVLCHK(*YES) on the create file or change file commands.</p>
<p>The level identifiers of the file opened and the file description that
is part of the compiled program are compared when the file is opened and LVLCHK(*YES)
is specified. The server does a format-by-format comparison of the level
identifiers. If the identifiers differ or if any of the formats specified
in the program do not exist in the file, a message is sent to the program
to identify the condition.</p>
<p>When the identifiers differ, this means that the file format has changed. If the changes affect a field that your program uses, you must compile the
program again for it to run properly. If the changes do not affect the fields
that your program uses, you can run the program without compiling again by
entering an override command for the file and specifying LVLCHK(*NO). Specifying
LVLCHK(*NO) causes the server to omit the level identifier check when the
file opens. For example, suppose that you add a field to the end of a record
format in a database file, but the program does not use the new field. You
can enter the <a href="../cl/ovrdbf.htm">Override
with Database File (OVRDBF)</a> command with LVLCHK(*NO) to enable the
program to run without compiling again.</p>
<p>There are several CL commands available to you to check the changes. You
can use the Display File Field Description (DSPFFD) command to display the
record-level and field-level descriptions or, if you have the source entry
utility (SEU), you can display the source file containing the DDS for the
file. You can display the format level identifier that is defined in the
file by using the <a href="../cl/dspfd.htm">Display
File Description (DSPFD)</a> or the <a href="../cl/dspffd.htm">DSPFFD</a> commands. The format level identifier which was
used when the program was created can be displayed by the <a href="../cl/dsppgmref.htm">Display Program References (DSPPGMREF)</a> command.</p>
<p>There are also some changes to a file description that will not cause an
error when the file opens. These happen because the record format identifiers
did not change or because your program does not use the changed formats. You
can add or remove formats from a file without affecting existing programs
that do not use the added or deleted formats.</p>
<p>Even though the level identifier does not change, some DDS functions that
you add or delete can require changes in the logic of your program. You should
review the functions you added or deleted to determine whether the program
logic requires changes.</p>
<p>Normally, the use of LVLCHK(*YES) is a good file integrity practice. The
use of LVLCHK(*NO) can produce unpredictable results.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3open.htm" title="When you want an application to use a file, you do so by referring to that file by name. The file description for that file will then control how the program and the server will interact.">Open files</a></div>
</div>
</div>
</body>
</html>