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

80 lines
5.7 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="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="Open considerations for files shared in a job" />
<meta name="abstract" content="There are certain points to consider when you open a shared file in the same job by specifying SHARE(*YES)." />
<meta name="description" content="There are certain points to consider when you open a shared file in the same job by specifying SHARE(*YES)." />
<meta name="DC.subject" content="job, shared files in, open considerations, sharing file, open processing, restriction, sharing files in same job, SHARE parameter, parameter, share, in same job, when not possible, *NO value, sharing file, library list, sharing files, override command" />
<meta name="keywords" content="job, shared files in, open considerations, sharing file, open processing, restriction, sharing files in same job, SHARE parameter, parameter, share, in same job, when not possible, *NO value, sharing file, library list, sharing files, override command" />
<meta name="DC.Relation" scheme="URI" content="rbal3share.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3openc" />
<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>Open considerations for files shared in a job</title>
</head>
<body id="rbal3openc"><a name="rbal3openc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Open considerations for files shared in a job</h1>
<div><p>There are certain points to consider when you open
a shared file in the same job by specifying SHARE(*YES).</p>
<ul><li>You must make sure that when the shared file is opened for the first time
in a job, all the open options that are needed for subsequent opens of the
file are specified. If the open options specified for subsequent opens of
a shared file do not match those specified for the first open of a shared
file, an error message is sent to the program. (You can correct this by making
changes to your program to remove any incompatible options.) <p>For example,
PGMA is the first program to open FILE1 in the job and PGMA only needs to
read the file. However, PGMA calls PGMB which will delete records from the
same shared file. Because PGMB will delete records from the shared file,
PGMA must open the file as if it, PGMA, is also going to delete records. You can accomplish this by using the correct specifications in the high-level
language. (In order to accomplish this in some high-level languages, you might
need to use file operation statements that are never run. See your appropriate
language information for more details.)</p>
</li>
<li>Sometimes sharing a file within a job is not possible. For example, one
program might need records from a file in arrival sequence, and another program
might need the records in keyed sequence. Or, you might use the same file for
printing output, but want to produce the output from each program separately. In these situations, you should not share the open data path. You would
specify SHARE(*NO) on the override command to ensure that programs do not
share the file within the job.</li>
<li>If debug mode is entered with UPDPROD(*NO) after the first open of a shared
file in a production library, subsequent shared opens of the file share the
original open data path and allow the file to be changed. To prevent this,
specify SHARE(*NO) on the OVERRIDE command before opening files while debugging
your program.</li>
<li>The use of commitment control for the first open of a shared file, requires
that all subsequent shared opens also use commitment control.</li>
<li>If you did not specify a library name in the program or the OVERRIDE command
(*LIBL is used), the server assumes that the library list has not changed
since the last open of the same shared file with *LIBL specified. If the
library list has changed, you should specify the library name on the OVERRIDE
command to ensure that you opened the correct file.</li>
<li>The server processes overrides and program specifications that are specified
on the first open of the shared file. Overrides and program specifications
specified on subsequent opens, other than those that change the file name
or the value specified on the SHARE or LVLCHK parameters on the OVERRIDE command,
are ignored.</li>
</ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3share.htm" title="File management on iSeries provides several levels of support for shared files. Files can be shared among many users, many jobs, or many programs within the same job.">Share files</a></div>
</div>
</div>
</body>
</html>