ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddm_5.4.0.1/rbae5hllinout.htm

270 lines
19 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="HLL program input and output operations with i5/OS DDM" />
<meta name="abstract" content="The high-level language operations are supported by DDM for keyed or nonkeyed operations." />
<meta name="description" content="The high-level language operations are supported by DDM for keyed or nonkeyed operations." />
<meta name="DC.subject" content="command, CL, OPNDBF (Open Database File), command, Open Database File (OPNDBF), OPNDBF (Open Database File), Open Database File (OPNDBF), database file, opening, command, CL, RCVF (Receive File), Receive File (RCVF), RCVF (Receive File), Receive File (RCVF), file, receiving, BASIC, restrictions, ILE COBOL programming language, ILE RPG programming language, OPEN statement, languages used, control language (CL), CL (control language), ILE C programming language" />
<meta name="keywords" content="command, CL, OPNDBF (Open Database File), command, Open Database File (OPNDBF), OPNDBF (Open Database File), Open Database File (OPNDBF), database file, opening, command, CL, RCVF (Receive File), Receive File (RCVF), RCVF (Receive File), Receive File (RCVF), file, receiving, BASIC, restrictions, ILE COBOL programming language, ILE RPG programming language, OPEN statement, languages used, control language (CL), CL (control language), ILE C programming language" />
<meta name="DC.Relation" scheme="URI" content="rbae5ddmall.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbae5hllinout" />
<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>HLL program input and output operations with i5/OS DDM</title>
</head>
<body id="rbae5hllinout"><a name="rbae5hllinout"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">HLL program input and output operations with <span class="keyword">i5/OS</span> DDM</h1>
<div><p>The high-level language operations are supported by DDM for keyed
or nonkeyed operations.</p>
<div class="section"><p>See the information in the following tables.</p>
</div>
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
<a name="rbae5hllinout__rbae5langtbl"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rbae5hllinout__rbae5langtbl" width="100%" border="0"><caption>Table 1. High-level language operations supported by DDM for keyed or nonkeyed
operations</caption><thead align="left"><tr><th rowspan="2" align="left" valign="bottom" width="25%" id="d0e117"> <span class="keyword">i5/OS™</span> database
operation</th>
<th colspan="4" align="center" valign="bottom" id="d0e123">High-level
languages</th>
</tr>
<tr><th align="left" valign="bottom" width="25%" id="d0e126">ILE RPG programming language</th>
<th align="left" valign="bottom" width="25%" id="d0e128">ILE COBOL programming language</th>
<th align="left" valign="bottom" width="12.592592592592592%" id="d0e130">  BASIC</th>
<th align="left" valign="bottom" width="12.407407407407407%" id="d0e132">  PL/I</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e117 ">Open file</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">OPEN</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">OPEN</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">OPEN</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">OPEN</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Query file</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">&nbsp;</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">&nbsp;</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">&nbsp;</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read (keyed access)</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">CHAIN (key)</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">READ INVALID KEY</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ KEY</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ EQUAL</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read first/last<sup>1</sup></td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">*LOVAL *HIVAL</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">READ FIRST LAST</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ FIRST LAST</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ FIRST LAST</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read next</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">READ READE<sup>2</sup></td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">READ &lt;NEXT&gt; AT END</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ NEXT</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read previous</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">READP</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">READ PRIOR AT END</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ PRIOR</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ PRV</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read next or previous<sup>3</sup> Next
equal Previous equal Next unique Previous unique</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">&nbsp;</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">&nbsp;</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ = =, PRIOR</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ NXTEQL PRVEQL NXTUNQ PRVUNQ</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Read (relative to start)<sup>4</sup></td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">CHAIN (rrn)</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">READ RELATIVE KEY</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">READ REC=</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">READ KEY</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Release record lock</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">EXCPT or next I/O op</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">(next I/O op)</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">(next I/O op)</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">(next I/O op)</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Force end of data</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">FEOD</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">&nbsp;</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">&nbsp;</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Position file<sup>5</sup></td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">SETGT SETLL</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">START KEY GREATER KEY NOT LESS KEY EQUAL</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">RESTORE</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 "> </td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Update record</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">UPDAT</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">REWRITE<sup>6</sup></td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">REWRITE</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">REWRITE</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Write record</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">WRITE/ EXCPT</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">WRITE<sup>6</sup></td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">WRITE</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">WRITE</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Delete record</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">DELET</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">DELETE<sup>6</sup></td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">DELETE</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">DELETE</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">Close file</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e126 ">CLOSE</td>
<td align="left" valign="top" width="25%" headers="d0e123 d0e128 ">CLOSE</td>
<td align="left" valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">CLOSE</td>
<td align="left" valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">CLOSE</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e117 ">&nbsp;</td>
<td valign="top" width="25%" headers="d0e123 d0e126 ">&nbsp;</td>
<td valign="top" width="25%" headers="d0e123 d0e128 ">&nbsp;</td>
<td valign="top" width="12.592592592592592%" headers="d0e123 d0e130 ">&nbsp;</td>
<td valign="top" width="12.407407407407407%" headers="d0e123 d0e132 ">&nbsp;</td>
</tr>
<tr><td colspan="5" align="left" valign="top" headers="d0e117 d0e123 d0e126 d0e128 d0e130 d0e132 "> <dl><dt class="dlterm"><sup>1</sup></dt>
<dd>For the ILE RPG language, if the keyed access path of a file specifies
DESCENDING, then *LOVAL gets the last record in the file and *HIVAL gets the
first record in the file.</dd>
<dt class="dlterm"><sup>2</sup></dt>
<dd>For duplicate keyed files, the ILE RPG language performs a READ NEXT operation
and compares the key of the returned record to determine if the record qualifies.
If so, the record is returned to the program; if not, an end-of-file indication
is returned.</dd>
<dt class="dlterm"><sup>3</sup></dt>
<dd>If the remote file is on a non-<span class="keyword">iSeries™ server</span>,
these operations cannot be performed using DDM.</dd>
<dt class="dlterm"><sup>4</sup></dt>
<dd>An <span class="keyword">iSeries</span> application
program can open a <em>keyed</em> access open data path to a file and then access
its records using both keyed and <em>relative record</em> access methods. Although
DDM supports the <em>combined-access</em> access method, a target server (such
as <span class="keyword">System/36™</span>) might not. In
this case, the <span class="keyword">i5/OS</span> can
do relative record accessing of a keyed file on a non-<span class="keyword">iSeries</span> target
server if the target server supports the <em>combined-by-record-number</em> access
method and if the DDM file specifies that method. The combined-by-record-number
access method is specified on an <span class="keyword">iSeries server</span> as
ACCMTH(*ARRIVAL *BOTH) on the <span class="cmdname">Create DDM File (CRTDDMF)</span> command.
If these values are not specified for the DDM file and the target server does
not support the combined-access access method, relative record operations
to a keyed file are rejected.</dd>
<dt class="dlterm"><sup>5</sup></dt>
<dd>Positioning operations (SET<var class="varname">xx</var> in the ILE RPG language,
or START in the ILE COBOL language) do not return the record data to the application
program. These operations also cause the file to be opened for random processing.</dd>
<dt class="dlterm"><sup>6</sup></dt>
<dd>ILE COBOL operations that change indexed or relative files can lock the
record before the operation to make the record eligible.</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</td></tr></table>
<div class="tablenoborder"><a name="rbae5hllinout__rbae5lantbl2"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rbae5hllinout__rbae5lantbl2" width="100%" frame="border" border="1" rules="all"><caption>Table 2. High-level language operations supported by DDM for keyed or nonkeyed
operations</caption><thead align="left"><tr><th rowspan="2" align="left" valign="bottom" width="33.33333333333333%" id="d0e407"> <span class="keyword">i5/OS</span> database
operation</th>
<th colspan="2" align="center" valign="bottom" id="d0e413">High-level
languages</th>
</tr>
<tr><th align="left" valign="bottom" width="33.33333333333333%" id="d0e416">CL</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e418">ILE C programming language</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Open file</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">OPNDBF</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FOPEN, FREOPEN</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Query file</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">OPNQRYF</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read (keyed access)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read first/last</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read next</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">RCVF</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FREAD, FGETC</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read previous</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read next or previous: Next equal Previous
equal Next unique Previous unique</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Read (relative to start)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Release record lock</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 "> </td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">(next I/O op)</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Force end of data</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FFLUSH</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Position file</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">POSDBF</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FSEEK, FSETPOS</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Update record</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 "> </td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FWRITE, FPUTC, FFLUSH</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Write record</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 "> </td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FWRITE, FPUTC, FFLUSH</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Delete record</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">&nbsp;</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 "> </td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e407 ">Close file</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e416 ">CLOF</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e413 d0e418 ">FCLOSE</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5ddmall.htm" title="DDM files can be used as data files or source files by high-level language (HLL) programs.">DDM considerations for all languages</a></div>
</div>
</div>
</body>
</html>