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

111 lines
7.6 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="concept" />
<meta name="DC.Title" content="Open considerations for files shared in a job or activation group" />
<meta name="abstract" content="Listed here are the considerations for opening a database file that is shared in the same job or activation group." />
<meta name="description" content="Listed here are the considerations for opening a database file that is shared in the same job or activation group." />
<meta name="DC.subject" content="opening, database file, shared in a job, shared in an activation group, sharing in a job, open, sharing in an activation group, shared in a job, shared in an activation group" />
<meta name="keywords" content="opening, database file, shared in a job, shared in an activation group, sharing in a job, open, sharing in an activation group, shared in a job, shared in an activation group" />
<meta name="DC.Relation" scheme="URI" content="rbafosfile.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="rbafoopenc" />
<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 or activation group</title>
</head>
<body id="rbafoopenc"><a name="rbafoopenc"><!-- --></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 or activation group</h1>
<div><p>Listed here are the considerations for opening a database file
that is shared in the same job or activation group.</p>
<div class="p"><ul><li>Make sure that when the shared file is opened for the first time in a
job or activation group, all the open options 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 or to the Open Database File (OPNDBF) or Open Query
File (OPNQRYF) command parameters, to remove any incompatible options.) <p>For
example, PGMA is the first program to open FILE1 in the job or activation
group 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 will have to 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. (To accomplish this in some high-level languages,
you might have to use file operation statements that are never run. See your
high-level language topic collection for more details.) You can also specify
the file processing option on the OPTION parameter on the OPNDBF and OPNQRYF
commands.</p>
</li>
<li>Sometimes sharing a file within a job or activation group is not desirable.
For example, one program needs records from a file in arrival sequence and
another program needs records in keyed sequence. In this situation, you should
not share the open data path (ODP). Specify SHARE(*NO) on the Override with
Database File (OVRDBF) command to ensure that the file is not shared within
the job or activation group.</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 ODP and allow the file to be changed. To prevent this,
specify SHARE(*NO) on the OVRDBF command before opening files being debugged.</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>Key feedback, insert key feedback, or duplicate key feedback must be specified
on the full open if any of these feedback types are desired on the subsequent
shared opens of the file.</li>
<li>If you did not specify a library name in the program or on the OVRDBF
command (*LIBL is used), the system 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
OVRDBF command to ensure that the correct file is opened.</li>
<li>The record length that is specified on the full open is the record length
that is used on subsequent shared opens even if a larger record length value
is specified on the shared opens of the file.</li>
<li>Overrides and program specifications specified on the first open of the
shared file are processed. 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 parameter of the OVRDBF command, are ignored.</li>
<li>Overrides specified for a first open using the OPNQRYF command can be
used to change the names of the files, libraries, and members that should
be processed by the OPNQRYF command. Any parameter values specified on the
OVRDBF command other than TOFILE, MBR, LVLCHK, and SEQONLY are ignored by
the OPNQRYF command.</li>
<li>The OPNDBF and OPNQRYF commands scope the ODP to the level specified on
the Open Scope (OPNSCOPE) parameter according to the following rules: <ul><li>The system searches for shared opens in the activation group first, and
then in the job.</li>
<li>Shared opens that are scoped to an activation group might not be shared
between activation groups.</li>
<li>Shared opens that are scoped to the job can be shared throughout the job,
by any number of activation groups at a time.</li>
</ul>
</li>
</ul>
</div>
<div class="p">The CPF4123 diagnostic message lists the mismatches that can be encountered
between the full open and the subsequent shared opens. These mismatches do
not cause the shared open to fail. <div class="note"><span class="notetitle">Note:</span> The OPNQRYF command never shares
an existing shared ODP in the job or activation group. If a shared ODP already
exists in the job or activation group with the same file, library, and member
name as the one specified on the OPNQRYF command, the system sends an error
message and the query file is not opened.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafosfile.htm" title="By default, the database management system lets one file be read and changed by many users at the same time. However, you can share the database files in the same job or activation group through the SHARE parameter.">Share database files in the same job or activation group</a></div>
</div>
</div>
</body>
</html>