122 lines
8.4 KiB
HTML
122 lines
8.4 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="Use Open Database File (OPNDBF) command" />
|
|
<meta name="abstract" content="Usually, when you use the Open Database File (OPNDBF) command, you use the defaults for the command parameter values. Sometimes you might want to specify particular values, instead of using the default values. Listed here are the parameters you can specify." />
|
|
<meta name="description" content="Usually, when you use the Open Database File (OPNDBF) command, you use the defaults for the command parameter values. Sometimes you might want to specify particular values, instead of using the default values. Listed here are the parameters you can specify." />
|
|
<meta name="DC.subject" content="Open Database File (OPNDBF) command, OPNDBF (Open Database File) command, command, CL, OPNDBF (Open Database File), OPTION parameter, parameter, OPTION" />
|
|
<meta name="keywords" content="Open Database File (OPNDBF) command, OPNDBF (Open Database File) command, command, CL, OPNDBF (Open Database File), OPTION parameter, parameter, OPTION" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafoopen.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="rbafoopndbf" />
|
|
<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>Use Open Database File (OPNDBF) command</title>
|
|
</head>
|
|
<body id="rbafoopndbf"><a name="rbafoopndbf"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Use Open Database File (OPNDBF) command</h1>
|
|
<div><p>Usually, when you use the Open Database File (OPNDBF) command,
|
|
you use the defaults for the command parameter values. Sometimes you might
|
|
want to specify particular values, instead of using the default values. Listed
|
|
here are the parameters you can specify.</p>
|
|
<div class="section"><h4 class="sectiontitle">ACCPTH parameter</h4><p>If the file has a keyed sequence
|
|
access path and either (1) the open option is *OUT, or (2) the open option
|
|
is *INP or *ALL, but your program does not use the keyed sequence access path,
|
|
then you can specify ACCPTH(*ARRIVAL) on the OPNDBF parameter. Ignoring the
|
|
keyed sequence access path can improve your job's performance.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">COMMIT parameter</h4><p>Specify
|
|
*YES if the application programs use commitment control. If you specify *YES,
|
|
you must be running in a commitment control environment (the Start Commitment
|
|
Control (STRCMTCTL) command was processed) or the OPNDBF command will fail.
|
|
Use the default of *NO if the application programs do not use commitment control.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">DUPKEYCHK parameter</h4><p>Specify whether you want duplicate key feedback.
|
|
If you specify *YES, duplicate key feedback is returned on I/O operations.
|
|
If you specify *NO, duplicate key feedback is not returned on I/O operations.
|
|
Use the default (*NO) if the application programs are not written in the COBOL/400<sup>®</sup> language
|
|
or C/400<sup>®</sup> language,
|
|
or if your COBOL or C programs do not use the duplicate-key feedback information
|
|
that is returned.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">MBR parameter</h4><div class="p">If a member, other than the
|
|
first member in the file, is to be opened, you must specify the name of the
|
|
member to be opened or issue an Override with Database File (OVRDBF) command
|
|
before the OPNDBF command.<div class="note"><span class="notetitle">Note:</span> You must specify a member name on the OVRDBF
|
|
command to use a member (other than the first member) to open in subsequent
|
|
programs.</div>
|
|
</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">OPNID parameter</h4><p>If
|
|
an identifier other than the file name is to be used, you must specify it.
|
|
The open identifier can be used in other control language (CL) commands to
|
|
process the file. For example, the Close File (CLOF) command uses the identifier
|
|
to specify which file is to be closed.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">OPNSCOPE parameter</h4><p>This parameter specifies the scoping
|
|
of the open data path (ODP). Specify *ACTGRPDFN if the request is from the
|
|
default activation group, and the ODP is to be scoped to the call level of
|
|
the program issuing the command. If the request is from any other activation
|
|
group, the ODP is scoped to that activation group. Specify *ACTGRP if the
|
|
ODP is to be scoped to the activation group of the program issuing the command.
|
|
Specify *JOB if the ODP is to be scoped to the job. If you specify this parameter
|
|
and the TYPE parameter you get an error message.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">OPTION parameter</h4><div class="p">Specify the *INP option if your
|
|
application programs use input-only processing (reading records without updating
|
|
records). This allows the system to read records without trying to lock each
|
|
one for possible update. Specify the *OUT option if your application programs
|
|
use output-only processing (writing records into a file but not reading or
|
|
updating existing records). <div class="note"><span class="notetitle">Note:</span> If your program does direct output operations
|
|
to active records (updating by relative record number), *ALL must be specified
|
|
instead of *OUT. If your program does direct output operations to deleted
|
|
records only, *OUT must be specified.</div>
|
|
</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">SEQONLY parameter</h4><p>Specify *YES if subsequent application
|
|
programs process the file sequentially. This parameter can also be used to
|
|
specify the number of records that should be transferred between the system
|
|
data buffers and the program data buffers. SEQONLY(*YES) is not allowed unless
|
|
OPTION(*INP) or OPTION(*OUT) is also specified on the Open Database File (OPNDBF)
|
|
command. Sequential-only processing should not be used with a keyed sequence
|
|
access path file unless the physical data is in access path order.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">TYPE parameter</h4><div class="p">Specify what you want
|
|
to happen when exceptions that are not monitored occur in your application
|
|
program. If you specify *NORMAL, one of the following operations can happen: <ul><li>Your program can issue a Reclaim Resources (RCLRSC) command to close the
|
|
files opened at a higher level in the call stack than the program issuing
|
|
the RCLRSC command.</li>
|
|
<li>The high-level language you are using can perform a close operation.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="p">Specify *PERM if you want to continue the application without
|
|
opening the files again. TYPE(*NORMAL) causes files to be closed if both of
|
|
the following situations occur: <ul><li>Your program receives an error message.</li>
|
|
<li>The files are opened at a higher level in the call stack.</li>
|
|
</ul>
|
|
TYPE(*PERM) allows the files to remain open even if an error message
|
|
is received. Do not specify this parameter if you specified the OPNSCOPE parameter.</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoopen.htm" title="These topics describe how to use the Open Query File (OPNQRYF) and Open Database File (OPNDBF) commands to open database file members in a program. Examples, performance considerations, and guidelines for writing a high-level language program are included. Typical errors that might occur are also discussed.">Open a database file</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |