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

132 lines
9.8 KiB
HTML
Raw Permalink 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="Share files" />
<meta name="abstract" content="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." />
<meta name="description" content="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." />
<meta name="DC.subject" content="SHARE parameter, description, sharing file, in same job, general considerations, file, sharing, open considerations, sharing files in same job, parameter, run-time, shared files in same job, original program model, SHARE, open operation, sharing files, close operation, scope in ILE model, ILE (Integrated Language Environment) model, Integrated Language Environment (ILE) model, high-level language, activation group, definition, open data path (ODP), ODP (open data path)" />
<meta name="keywords" content="SHARE parameter, description, sharing file, in same job, general considerations, file, sharing, open considerations, sharing files in same job, parameter, run-time, shared files in same job, original program model, SHARE, open operation, sharing files, close operation, scope in ILE model, ILE (Integrated Language Environment) model, Integrated Language Environment (ILE) model, high-level language, activation group, definition, open data path (ODP), ODP (open data path)" />
<meta name="DC.Relation" scheme="URI" content="rbal3workwith.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3openc.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3ioc.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3closec.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3ft.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3openiofba.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3share" />
<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>Share files</title>
</head>
<body id="rbal3share"><a name="rbal3share"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Share files</h1>
<div><p>File management on <span class="keyword">iSeries™</span> provides
several levels of support for shared files. Files can be shared among many
users, many jobs, or many programs within the same job.</p>
<p> The server automatically provides the first level of support.
By default, the server lets multiple users and multiple jobs use one file
at the same time. The server allocates the file and its associated resources
for each use of the file in such a way that it can prevent conflicting uses.
Within the same job, programs can share files if one program opens the same
file more than once or if different programs open the same file. Even though
the same file is being used, each open operation creates a new path from the
program to the data or device, so that each open represents an independent
use of the file.</p>
<div class="section"><h4 class="sectiontitle">Open data path</h4><div class="p">A closer level of sharing within
a job allows more than one program to share the same path to the data or device.
This path, called an <strong>open data path</strong>, is the path through which all
of the read and write operations for the file are performed. You can use this
level of sharing by specifying the SHARE parameter on the create file, change
file, and override file commands. The SHARE parameter allows more than one
program to share the file status, positions, and storage area. It can improve
performance by reducing the amount of main storage the job needs and by reducing
the time it takes to open and close the file. <span class="keyword">iSeries</span> bases
this level of sharing on two models: <ul><li>The <strong>original program model</strong> is the set of functions for compiling
source code and creating high-level language programs on the <span class="keyword">iSeries</span> server
before the Integrated
Language Environment<sup>®</sup> (ILE) model was introduced.</li>
<li>The <strong>ILE model</strong> is the set of constructs and interfaces that provide
a common run-time environment and run-time bindable application programming
interface (APIs) for all ILE-conforming high-level languages.</li>
</ul>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Shared files in the original program model</h4><p>In the
original program model, the SHARE(*YES) parameter lets two or more programs
that run in the same job share an open data path (ODP). It connects the program
to a file. If not specified otherwise, every time a file is opened a new open
data path is built. You can specify that if a file is opened more than once
and an open data path is still active for it in the same job, the active ODP
for the file can be used with the current open of the file; a new open data
path does not need to be created. This reduces the amount of time that is
required to open the file after the first opened to open the file after the
first open, and the amount of main storage that is required by the job. You
must specify SHARE(*YES) for the first open and other opens of the same file
to share the open data path. A well-designed (for performance) application
will normally do a shared open on database files that multiple programs will
open in the same job. Specifying SHARE(*YES) for other files depends on the
application.</p>
</div>
<div class="section"><h4 class="sectiontitle">Shared files in the ILE model</h4><p>In the ILE model,
shared files are scoped either to the job level or to the activation group
level. An <strong>activation group</strong> is a substructure of a run-time job. It
consists of server resources (storage for program or procedure variables,
commitment definitions, and open files) that are allocated to one or more
programs. An activation group is like a miniature job within a job.</p>
<p>Any
programs that run in any activation group can share shared files that are
scoped to the job level. Only programs that run in the same activation group
can share shared files that are scoped to the activation group level.</p>
</div>
<div class="section"><h4 class="sectiontitle">Share files: Considerations</h4><p>Sharing
files allows you to have programs within a job interact in ways that would
otherwise not be possible. However, you need to understand the effects of
opening, performing read and write operations, and closing shared files.</p>
<p>You
should also see the appropriate documentation for all of the file types to
understand how this support works, and the rules your programs must follow
to use it correctly.</p>
<div class="note"><span class="notetitle">Note:</span> Most high-level language programs process an
open or a close operation independent of whether the file is being shared.
You do not specify that the file is being shared in the high-level language
program. You indicate that the file is being shared in the same job through
the SHARE parameter. You specify the SHARE parameter only on the CREATE, CHANGE,
and OVERRIDE file commands. Refer to your appropriate language information
for more information.</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbal3openc.htm">Open considerations for files shared in a job</a></strong><br />
There are certain points to consider when you open a shared file in the same job by specifying SHARE(*YES).</li>
<li class="ulchildlink"><strong><a href="rbal3ioc.htm">I/O considerations for files shared in a job</a></strong><br />
The server uses the same input/output area for all programs sharing the file, so the order of the operations is sequential regardless of which program does the operation.</li>
<li class="ulchildlink"><strong><a href="rbal3closec.htm">Close considerations for files shared in a job</a></strong><br />
The processing done when a program closes a shared file depends on whether other programs currently share the open data path.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3workwith.htm" title="This topic describes the various tasks that can be used to ensure that files are used effectively.">Work with database files</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbal3ft.htm">File types</a></div>
<div><a href="rbal3openiofba.htm" title="The server monitors the status of a file in feedback areas once it has successfully opened the file. As the server performs operations on a file, it updates the feedback areas to reflect the latest status. These feedback areas give you greater control over applications and provide important information when errors occur.">Monitor file status with the open and I/O feedback area</a></div>
</div>
</div>
</body>
</html>