404 lines
14 KiB
HTML
404 lines
14 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Open Data Base File (OPNDBF)</title>
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<a name="OPNDBF.Top_Of_Page"></a>
|
|
<h2>Open Data Base File (OPNDBF)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>Conditional
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#OPNDBF.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#OPNDBF.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#OPNDBF.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="OPNDBF"></a>
|
|
<p>The Open Database File (OPNDBF) command opens a database file member. Processing of records is done later by application programs that do shared open operations.
|
|
</p>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ul>
|
|
<li>This command is conditionally threadsafe. In multithreaded jobs, this command:
|
|
<ul>
|
|
<li>Is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA.
|
|
</li>
|
|
<li>Is not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA.
|
|
</li>
|
|
<li>Is not threadsafe for logical files that require a format selector program.
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="OPNDBF.PARAMETERS.TABLE">Parameters</a></h3>
|
|
<table border="1" cellpadding="4" cellspacing="0">
|
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
|
<tr>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#OPNDBF.FILE"><b>FILE</b></a></td>
|
|
<td valign="top">File</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: File</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#OPNDBF.OPTION"><b>OPTION</b></a></td>
|
|
<td valign="top">Open option</td>
|
|
<td valign="top">*INP, *OUT, *ALL</td>
|
|
<td valign="top">Required, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.MBR"><b>MBR</b></a></td>
|
|
<td valign="top">Member to be opened</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*FIRST</u></b>, *LAST</td>
|
|
<td valign="top">Optional, Positional 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.OPNID"><b>OPNID</b></a></td>
|
|
<td valign="top">Open file identifier</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*FILE</u></b></td>
|
|
<td valign="top">Optional, Positional 4</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.ACCPTH"><b>ACCPTH</b></a></td>
|
|
<td valign="top">Access path to use</td>
|
|
<td valign="top"><b><u>*FILE</u></b>, *ARRIVAL</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#OPNDBF.SEQONLY"><b>SEQONLY</b></a></td>
|
|
<td valign="top">Limit to sequential only</td>
|
|
<td valign="top"><i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Sequential only</td>
|
|
<td valign="top">
|
|
<b><u>*NO</u></b>, *YES</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Number of records</td>
|
|
<td valign="top">
|
|
<i>Integer</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.COMMIT"><b>COMMIT</b></a></td>
|
|
<td valign="top">Commitment control active</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.OPNSCOPE"><b>OPNSCOPE</b></a></td>
|
|
<td valign="top">Open scope</td>
|
|
<td valign="top"><b><u>*ACTGRPDFN</u></b>, *ACTGRP, *JOB</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.DUPKEYCHK"><b>DUPKEYCHK</b></a></td>
|
|
<td valign="top">Duplicate key check</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#OPNDBF.TYPE"><b>TYPE</b></a></td>
|
|
<td valign="top">Type of open</td>
|
|
<td valign="top"><b><u>*NORMAL</u></b>, *PERM</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="OPNDBF.FILE"></a>
|
|
<h3>File (FILE)</h3>
|
|
<p>Specifies the file that contains the member to be opened. Overrides currently in effect are processed.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p><b>Qualifier 1: File</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of file.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the library list for the current thread are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the job is used to locate the file. If no library is specified as the current library, QGPL is used.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be searched.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.OPTION"></a>
|
|
<h3>Open option (OPTION)</h3>
|
|
<p>Specifies the options to use to open a file. The options chosen on the first full open operation of a file are not changed on subsequent shared options.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b>*INP</b></dt>
|
|
<dd>The file is opened only for input operations.
|
|
</dd>
|
|
<dt><b>*OUT</b></dt>
|
|
<dd>The file is opened only for output operations.
|
|
</dd>
|
|
<dt><b>*ALL</b></dt>
|
|
<dd>The file is opened for all operations (input, output, update, and delete).
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.MBR"></a>
|
|
<h3>Member to be opened (MBR)</h3>
|
|
<p>Specifies the member to open in the database file.
|
|
</p>
|
|
<dl>
|
|
</dl>
|
|
<dl>
|
|
<dt><b><u>*FIRST</u></b></dt>
|
|
<dd>The first member of the specified file is used.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*LAST</b></dt>
|
|
<dd>The last member created in the file is opened.
|
|
</dd>
|
|
<dt><b><i>member-name</i></b></dt>
|
|
<dd>Specify the name of the member to be opened.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.OPNID"></a>
|
|
<h3>Open file identifier (OPNID)</h3>
|
|
<p>Specifies the identifier used for naming this open operation so it can be referred to when the member is closed or positioned. This identifier must be specified on the Close File (CLOF) command, and on the Position Database File (POSDBF) command. It is not used on another Open Database File (OPNDBF) command until the file is closed, or an escape message is sent and the open operation fails.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*FILE</u></b></dt>
|
|
<dd>The file name is used for the open operation identifier.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name used to identify this open operation.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.ACCPTH"></a>
|
|
<h3>Access path to use (ACCPTH)</h3>
|
|
<p>Specifies which access path to use for this open operation.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*FILE</u></b></dt>
|
|
<dd>The file access path is used. If the file is keyed, the keyed access path is used; otherwise, the arrival sequence path is used.
|
|
</dd>
|
|
<dt><b>*ARRIVAL</b></dt>
|
|
<dd>The arrival sequence access path is used. If the file is keyed, the keyed access path is ignored.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.SEQONLY"></a>
|
|
<h3>Limit to sequential only (SEQONLY)</h3>
|
|
<p>Specifies, for database files whose records are normally processed in sequential order, whether sequential-only processing is used on the file. This parameter also specifies the number of records transferred as a group to or from the database file if sequential-only processing is used. If an override specifying sequential only processing is in effect, it takes precedence over what is specified on this parameter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>If *ALL is specified for the <b>Open option (OPTION)</b> parameter or *YES is specified for the <b>Commitment control active (COMMIT)</b> parameter, the *NO value is used for this parameter.
|
|
</p>
|
|
<p><b>Element 1: Sequential only</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>The database file does not use sequential-only processing.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>The database file uses sequential-only processing.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Number of records</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>integer</i></b></dt>
|
|
<dd>The file uses sequential-only processing. This parameter value indicates the number of records the database blocks up in its internal buffer before actually accessing the data in the member. Specifying this number is not required. If this value is not specified, the database chooses a default value.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.COMMIT"></a>
|
|
<h3>Commitment control active (COMMIT)</h3>
|
|
<p>Specifies whether this file is placed under commitment control.
|
|
</p>
|
|
<p>Before a database file is opened under commitment control, the user must ensure that all files in the commitment transaction are journaled. If only the after images are being journaled, the system implicitly begins journaling both the before and the after images for the duration of the changes being made to files opened under this commitment definition.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>This file is not placed under commitment control.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>This file is placed under commitment control.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.OPNSCOPE"></a>
|
|
<h3>Open scope (OPNSCOPE)</h3>
|
|
<p>Specifies the extent of influence (scope) of the open operation.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ACTGRPDFN</u></b></dt>
|
|
<dd>The scope of the open operation is determined by the activation group of the program that called the OPNDBF command processing program. If the activation group is the default activation group, the scope is the call level of the caller. If the activation group is a non-default activation group, the scope is the activation group of the caller.
|
|
</dd>
|
|
<dt><b>*ACTGRP</b></dt>
|
|
<dd>The scope of the open data path (ODP) is the activation group. Only those shared opens from the same activation group can share this ODP. This ODP is not reclaimed until the activation group is deactivated, or until the Close File (CLOF) command closes the activation group.
|
|
</dd>
|
|
<dt><b>*JOB</b></dt>
|
|
<dd>The scope of the open operation is the job in which the open operation occurs.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.DUPKEYCHK"></a>
|
|
<h3>Duplicate key check (DUPKEYCHK)</h3>
|
|
<p>Specifies whether duplicate key checking is done on input and output operations opened by this command.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>No duplicate key feedback is provided on input and output commands.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>Duplicate key feedback is provided on input and output commands.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="OPNDBF.TYPE"></a>
|
|
<h3>Type of open (TYPE)</h3>
|
|
<p>Specifies the recursion level at which the reclaim resources function (RCLRSC) is effective.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>This parameter is not valid when the <b>Open scope (OPNSCOPE)</b> parameter is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NORMAL</u></b></dt>
|
|
<dd>Allow the reclaim resources function to close the file if the program exits without doing a close operation.
|
|
</dd>
|
|
<dt><b>*PERM</b></dt>
|
|
<dd>The file remains open until a close operation is done using the Close File (CLOF) command, or until the routing step ends. The open data path (ODP) remains in existence even if the Reclaim Resources (RCLRSC) command is used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="OPNDBF.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p>
|
|
<pre>
|
|
OPNDBF FILE(MASTER/PAYROLL) OPTIONS(*INP)
|
|
</pre>
|
|
</p>
|
|
<p>This command opens the first member in the file PAYROLL for input processing. The open identifier associated with this open operation has the file name as its identifier. If the file is specified as SHARE(*YES), subsequent open operations of the file PAYROLL (such as in an application program) perform more efficiently and use the same ODP.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="OPNDBF.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPF4125</b></dt>
|
|
<dd>Open of member &3 file &1 in &2 failed.
|
|
</dd>
|
|
<dt><b>CPF4174</b></dt>
|
|
<dd>OPNID(&4) for file &1 already exists.
|
|
</dd>
|
|
<dt><b>CPF4175</b></dt>
|
|
<dd>Output only and MBR(*ALL) cannot be used together.
|
|
</dd>
|
|
<dt><b>CPF4176</b></dt>
|
|
<dd>File &1 in &2 not a data base file.
|
|
</dd>
|
|
<dt><b>CPF432A</b></dt>
|
|
<dd>Open not allowed under commitment control; reason code &8.
|
|
</dd>
|
|
<dt><b>CPF4327</b></dt>
|
|
<dd>Commitment control resource limit exceeded.
|
|
</dd>
|
|
<dt><b>CPF4328</b></dt>
|
|
<dd>Member &4 not journaled to journal &6.
|
|
</dd>
|
|
<dt><b>CPF4329</b></dt>
|
|
<dd>Cannot associate journal &6 with commitment definition &9.
|
|
</dd>
|
|
<dt><b>CPF8361</b></dt>
|
|
<dd>Cannot place resource under commitment control. Reason code &1.
|
|
</dd>
|
|
<dt><b>CPF8367</b></dt>
|
|
<dd>Cannot perform commitment control operation.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#OPNDBF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|