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

75 lines
5.2 KiB
HTML
Raw 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="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 a database file member" />
<meta name="abstract" content="You can open a database file member with statements in your high-level language program. You can also use the control language (CL) open commands: Open Database File (OPNDBF) and Open Query File (OPNQRYF)." />
<meta name="description" content="You can open a database file member with statements in your high-level language program. You can also use the control language (CL) open commands: Open Database File (OPNDBF) and Open Query File (OPNQRYF)." />
<meta name="DC.subject" content="database file, opening, members, commands to use, query file" />
<meta name="keywords" content="database file, opening, members, commands to use, query file" />
<meta name="DC.Relation" scheme="URI" content="rbafoopen.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/opndbf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/opnqryf.htm" />
<meta name="DC.Relation" scheme="URI" content="../rbam6/rbam6clmain.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="rbafoodbfm" />
<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 a database file member</title>
</head>
<body id="rbafoodbfm"><a name="rbafoodbfm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Open a database file member</h1>
<div><p>You can open a database file member with statements in your high-level
language program. You can also use the control language (CL) open commands:
Open Database File (OPNDBF) and Open Query File (OPNQRYF).</p>
<p>To use a database file in a program, your program must issue an open operation
to the database file. If you do not specify an open operation in some programming
languages, they automatically open the file for you. If you did
not specify a member name in your program or on an Override with Database
File (OVRDBF) command, the first member (as defined by creation date and time)
in the file is used.</p>
<p>If you specify a member name, files that have the correct file name but
do not contain the member name are ignored. If you have multiple database
files named FILEA in different libraries, the member that is opened is the
first one in the library list that matches the request. For example, LIB1,
LIB2, and LIB3 are in your library list and all three contain a file named
FILEA. Only FILEA in LIB3 has a member named MBRA that is to be opened. Member
MRBA in FILEA in LIB3 is opened; the other FILEAs are ignored.</p>
<p>After finding the member, the system connects your program to the database
file. This allows your program to perform input/output operations to the file.
For more information about opening files in your high-level language program,
see the appropriate high-level language topic collection.</p>
<p> You can also open a database file member with the OPNDBF command and the
OPNQRYF command. The OPNDBF command is useful in an initial program in a job
for opening shared files. The OPNQRYF command is very effective in selecting
and arranging records outside your program. Then, your program can use the
information supplied by the OPNQRYF command to process only the data it needs. </p>
</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 class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../rbam6/rbam6clmain.htm">Control language (CL)</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../cl/opndbf.htm">Open Database File (OPNDF) command</a></div>
<div><a href="../cl/opnqryf.htm">Open Query File (OPNQRYF) command</a></div>
</div>
</div>
</body>
</html>