ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/ovrdf.htm

105 lines
7.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="task" />
<meta name="DC.Title" content="Override display files in a CL procedure" />
<meta name="abstract" content="You can use the Override with Display File (OVRDSPF) command to replace the display file named in a CL procedure or program or to change certain parameters of the existing display file. This may be especially useful for files that have been renamed or moved since the module or program was compiled." />
<meta name="description" content="You can use the Override with Display File (OVRDSPF) command to replace the display file named in a CL procedure or program or to change certain parameters of the existing display file. This may be especially useful for files that have been renamed or moved since the module or program was compiled." />
<meta name="DC.subject" content="CL procedure, overriding display file, file" />
<meta name="keywords" content="CL procedure, overriding display file, file" />
<meta name="DC.Relation" scheme="URI" content="wfile.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/ovrdspf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sndf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/rcvf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sndrcvf.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="ovrdf" />
<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>Override display files in a CL procedure</title>
</head>
<body id="ovrdf"><a name="ovrdf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Override display files in a CL procedure</h1>
<div><p>You can use the <span class="cmdname">Override with Display File (OVRDSPF)</span> command
to replace the display file named in a CL procedure or program or to change
certain parameters of the existing display file. This may be especially useful
for files that have been renamed or moved since the module or program was
compiled.</p>
<div class="section"> <p>The initial parameters of the <span class="cmdname">Override with Display
File (OVRDSPF)</span> command are: </p>
<pre>OVRDSPF FILE(overridden-file-name) TOFILE(new-file-name)
DEV(device-name)</pre>
<p>The <span class="cmdname">Override with Display File (OVRDSPF)</span> command
is valid for a file referred to by a CL procedure or program only if the file
specified on the DCLF command was a display file when the module or program
was created. The file used when the program is run must be of the same type
as the file referred to when the module or program was created.</p>
<p>You
must run the <span class="cmdname">Override with Display File (OVRDSPF)</span> command
before opening the file that is being overridden. An open is caused by the
first use of a send or receive command. The system overrides the file on finding
any of the following conditions: </p>
<ul><li>A procedure or program that contains the <span class="cmdname">Override with Display
File (OVRDSPF)</span> command opens the file.</li>
<li>The file opens in another procedure which transfers control by using the
CALLPRC command.</li>
<li>The file opens in another program which transfers control by using the
CALL command.</li>
</ul>
<p>When you override to a different file, only those record format names
referred to on the <span class="cmdname">Send File (SNDF)</span>, <span class="cmdname">Receive File
(RCVF)</span>, or <span class="cmdname">Send/Receive File (SNDRCVF)</span> command
need to be in the overriding file. In the following illustration, display
file FILEY does not need record format TWO or THREE.</p>
<br /><img src="rbafn531.gif" alt="In this illustration, display file FILEY does not need record format TWO or THREE. When you override to a different file, only those record format names referred to on the SNDF, RCVF, or SNDRCVF command need to be in the overriding file." /><br /> <p>You should make sure that
the record format referred to names of the original file and the overriding
files have the same field definitions and indicator names in the same order.
You may get unexpected results if you specify LVLCHK(*NO).</p>
<p>Another
consideration has to do with the DEV parameter on the <span class="cmdname">Send File (SNDF)</span>, <span class="cmdname">Receive
File (RCVF)</span>, and <span class="cmdname">Send/Receive File (SNDRCVF)</span> commands
when an <span class="cmdname">Override with Display File (OVRDSPF)</span> command is
applied. If *FILE is specified on the DEV parameter of the <span class="cmdname">Receive
File (RCVF)</span>, <span class="cmdname">Send File (SNDF)</span>, or <span class="cmdname">Send/Receive
File (SNDRCVF)</span> command, the system automatically directs the operation
to the correct device for the overridden file. If a specific device is specified
on the DEV keyword of the RCVF, SNDF, or SNDRCVF command, one of the following
may occur: </p>
<ul><li>If a single device display file is being used, an error will occur if
the display file is overridden to a device other than the one specified on
the <span class="cmdname">Receive File (RCVF)</span>, <span class="cmdname">Send File (SNDF)</span>,
or <span class="cmdname">Send/Receive File (SNDRCVF)</span> command.</li>
<li>If a multiple device display file is being used, an error will occur if
the device specified on the <span class="cmdname">Receive File (RCVF)</span>, <span class="cmdname">Send
File (SNDF)</span>, or <span class="cmdname">Send/Receive File (SNDRCVF)</span> command
is not among those specified on the <span class="cmdname">Override with Display File (OVRDSPF)</span> command.</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="wfile.htm" title="Two types of files are supported in CL procedures and programs: display files and database files.">Work with files in CL procedures</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/ovrdspf.htm">Override with Display File (OVRDSPF) command</a></div>
<div><a href="../cl/sndf.htm">Send File (SNDF) command</a></div>
<div><a href="../cl/rcvf.htm">Receive File (RCVF) command</a></div>
<div><a href="../cl/sndrcvf.htm">Send/Receive File (SNDRCVF) command</a></div>
</div>
</div>
</body>
</html>