75 lines
4.7 KiB
HTML
75 lines
4.7 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="reference" />
|
||
|
<meta name="DC.Title" content="Example 3: A single set of files with different processing requirements" />
|
||
|
<meta name="abstract" content="This example shows the methods that can be used if some programs need read-only file processing and others need some or all of the options (input/update/add/delete)." />
|
||
|
<meta name="description" content="This example shows the methods that can be used if some programs need read-only file processing and others need some or all of the options (input/update/add/delete)." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafoclose.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="rbafocloseex3" />
|
||
|
<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>Example 3: A single set of files with different processing requirements</title>
|
||
|
</head>
|
||
|
<body id="rbafocloseex3"><a name="rbafocloseex3"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Example 3: A single set of files with different processing requirements</h1>
|
||
|
<div><p>This example shows the methods that can be used if some programs
|
||
|
need read-only file processing and others need some or all of the options
|
||
|
(input/update/add/delete).</p>
|
||
|
<div class="section"><p>The same methods apply if a file is to be processed with certain
|
||
|
command parameters in some programs and not in others (for example, sometimes
|
||
|
the commit option should be used).</p>
|
||
|
<p>A single Open Database File (OPNDBF)
|
||
|
command can be used to specify OPTION(*ALL) and the open data path would be
|
||
|
opened shared (if, for example, a previous Override with Database File (OVRDBF)
|
||
|
command was used to specify SHARE(*YES)). Each program can then open a subset
|
||
|
of the options. The program requests the type of open depending on the specifications
|
||
|
in the program. In some cases this does not require any more considerations
|
||
|
because a program specifying an open for input only would operate similarly
|
||
|
as if it had not done a shared open (for example, no additional record locking
|
||
|
occurs when a record is read).</p>
|
||
|
</div>
|
||
|
<div class="section"><p>However, some options specified on the OPNDBF command can affect
|
||
|
how the program operates. For example, SEQONLY(*NO) is specified on the open
|
||
|
command for a file in the program. An error would occur if the OPNDBF command
|
||
|
used SEQONLY(*YES) and a program attempted an operation that was not valid
|
||
|
with sequential-only processing.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>The ACCPTH parameter must also be consistent with the way programs
|
||
|
will use the access path (arrival or keyed).</p>
|
||
|
</div>
|
||
|
<div class="section"><p>If COMMIT(*YES) is specified on the OPNDBF command and the Start
|
||
|
Commitment Control (STRCMTCTL) command specifies LCKLVL(*ALL) or LCKLVL(*CS),
|
||
|
any read operation of a record locks that record (per commitment control record
|
||
|
locking rules). This can cause records to be locked unexpectedly and cause
|
||
|
errors in the program.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>Two OPNDBF commands can be used for the same data (for example,
|
||
|
one with OPTION(*ALL) and the other specifying OPTION(*INP)). The second use
|
||
|
must be a logical file pointing to the same physical file(s). This logical
|
||
|
file can then be opened as SHARE(*YES) and multiple uses made of it during
|
||
|
the same job.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoclose.htm" title="Listed here are the considerations for closing a database file that is shared in the same job or activation group.">Close considerations for files shared in a job or activation group</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|