316 lines
7.7 KiB
HTML
316 lines
7.7 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">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Run Database Hash (qdbrunha) API</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- 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. -->
|
|
<!-- Print SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--File Edited March 2001 -->
|
|
<!-- This file has undergone html cleanup on 1/7/02 by JET -->
|
|
<!-- Miscellaneous fixes on 05/01/13 by JET -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Run Database Hash (qdbrunha) API</h2>
|
|
|
|
<div class="box" style="width: 80%;">
|
|
<br>
|
|
Required Parameter Group:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Hash name</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Function</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(1)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">3</td>
|
|
<td align="left" valign="top">Number of keys</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">Key values</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">5</td>
|
|
<td align="left" valign="top">Data</td>
|
|
<td align="left" valign="top">I/O</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">6</td>
|
|
<td align="left" valign="top">Length of Data</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">7</td>
|
|
<td align="left" valign="top">Return code</td>
|
|
<td align="left" valign="top">Output</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
Service Program Name: QDBRUNHA<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The Run Database Hash (qdbrunha) API allows the user to FETCH, UPDATE,
|
|
DELETE and INSERT data into existing database files using an alternative access
|
|
method. The hash approach can be used on relatively static files in situations
|
|
where it is desirable to reduce the amount of memory that is consumed by
|
|
indexes. Its affectiveness is reduced in memory-rich environments or
|
|
environments with dynamic data.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>HASH User Space in Library QUSRSYS</em></dt>
|
|
|
|
<dd>*OBJOPR, *READ, and *UPDATE</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Hash name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>The hash name used to access the data. See the description of the Create
|
|
Database Hash (qdbcrtha) API for information on defining and naming
|
|
the hash.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Function</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(1)
|
|
|
|
<p>The function to be performed. The possible values are character digits as
|
|
follows:</p>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="5%" valign="top"><em>1</em></td>
|
|
<td width="95%" valign="top">Fetch a row for read purposes only</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>2</em></td>
|
|
<td valign="top">Fetch a row with intent to update</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>3</em></td>
|
|
<td valign="top">Update the currently locked row</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>4</em></td>
|
|
<td valign="top">Delete the currently locked row</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>5</em></td>
|
|
<td valign="top">Insert a row into the database</td>
|
|
</tr>
|
|
</table>
|
|
</dd>
|
|
|
|
<dd><br>
|
|
</dd>
|
|
|
|
<dt><strong>Number of keys</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The number of keys used by the hash.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Key values</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(*)
|
|
|
|
<p>A structure containing up to five rows of the name of key fields and the
|
|
value of key fields in the order that they appear in the logical file used to
|
|
create the hash. For more details, see <a href="#HDRFIELDR">Field
|
|
Descriptions</a>.</p>
|
|
|
|
<table border width="80%">
|
|
<tr>
|
|
<th align="center" valign="bottom" colspan="2">Offset</th>
|
|
<th align="left" valign="bottom" rowspan="2">Type</th>
|
|
<th align="left" valign="bottom" rowspan="2">Field</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th align="center" valign="bottom">Dec</th>
|
|
<th align="center" valign="bottom">Hex</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%"></td>
|
|
<td align="center" valign="top" width="10%"></td>
|
|
<td align="left" valign="top" width="20%">CHAR(10)</td>
|
|
<td align="left" valign="top" width="60%">Name of key</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"></td>
|
|
<td align="center" valign="top"></td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
<td align="left" valign="top">Value of key</td>
|
|
</tr>
|
|
</table>
|
|
</dd>
|
|
|
|
<dd><br>
|
|
</dd>
|
|
|
|
<dt><strong>Data</strong></dt>
|
|
|
|
<dd>I/O; CHAR(*)
|
|
|
|
<p>A pointer to the actual row of data from the database to be manipulated
|
|
according to the function parameter. The row will be inserted, deleted,
|
|
updated, or fetched from the database.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Data length</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the buffer in the application that will receive or contain the
|
|
data.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Return code</strong></dt>
|
|
|
|
<dd>OUTPUT; BINARY(4)
|
|
|
|
<p>A numeric indication as to what took place during the hash function request.
|
|
The possible values are:</p>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="5%" valign="top"><em>0</em></td>
|
|
<td width="95%" valign="top">No errors.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>1</em></td>
|
|
<td valign="top">Hash user space does not exist.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>2</em></td>
|
|
<td valign="top">Hash does not exist.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>100</em></td>
|
|
<td valign="top">Record not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>812</em></td>
|
|
<td valign="top">Lock-wait time-out.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>-99</em></td>
|
|
<td valign="top">Another error was encountered and ignored. See job log for
|
|
details.</td>
|
|
</tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3><a name="HDRFIELDR">Field Descriptions</a></h3>
|
|
|
|
<p><strong>Name of key.</strong> The name of the key field in the order that
|
|
they appear in the logical file referenced in the associated Create Database
|
|
Hash (QDBCRTHA) API. The names are for documentation purposes only.</p>
|
|
|
|
<p><strong>Value of key.</strong> The key value used by the API to access the
|
|
appropriate record in the file.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<p>Only the error conditions listed in the return code parameter are monitored.
|
|
No error messages other than the value of the return code parameter are
|
|
returned.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<hr>
|
|
API Introduced: V4R3
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#top_Of_Page">Top</a> | <a href=
|
|
"file1.htm">Database and File APIs</a> | <a href="aplist.htm">APIs by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<br>
|
|
</body>
|
|
</html>
|
|
|