ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qrzrtvr.htm

387 lines
12 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>Retrieve Hardware Resource Relative (QRZRTVR) 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. -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- End Header Records -->
<!-- This file has undergone html cleanup on 1/14/02 by JET -->
<!-- Imbedded GIF file: RBAFX502 -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link-->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Retrieve Hardware Resource Relative (QRZRTVR) API</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;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="40%">Resource name</td>
<td align="left" valign="top" width="25%">Output</td>
<td align="left" valign="top" width="25%">Char(32)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Resource criteria</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *EXCLUDE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve Hardware Resource Relative (QRZRTVR) API retrieves the resource
name of a family member that matches the resource criteria. The user of the API
supplies the resource criteria, and the first or next resource name that
matches the resource criteria is returned. The resource name can be used with
other hardware resource APIs to get more information about a specific hardware
resource.</p>
<p>You can use this API to do the following:</p>
<ul>
<li>Retrieve the resource name of the parent resource. You can move up the
hierarchical path by using the attempt, FIRST.</li>
<li>Retrieve a resource name of the child resource. You can move down or across
the hierarchical path by using either the attempt, FIRST, or the attempt,
NEXT.</li>
</ul>
<p><strong><a name="FIGRTVHWEX">Example of a Resource
Hierarchy</a></strong></p>
<p align="center"><img src="RBAFX502.gif" alt=
"Example of a resource hierarchy"></p>
<p>In <a href="#FIGRTVHWEX">Example of a Resource Hierarchy</a>, the attempt,
FIRST, moves down the child resource hierarchy. For example, if in the resource
criteria, Resource A is specified in the search resource name field, the search
request of FIRST results in receiving Resource B.</p>
<p>Another search request of FIRST that still uses Resource A results in
receiving Resource B. If the search resource name field in the resource
criteria is changed to Resource B, the search request of FIRST results in
receiving Resource E. If the search resource name field in the resource
criteria is changed to Resource E, the search request of FIRST results in an
error, CPF0B46 (Materialize failed).</p>
<p>The attempt NEXT travels across the sibling resource structure. If the
search resource name field in the resource criteria is Resource A, the search
request of FIRST results in receiving Resource B. Another search request of
NEXT that still uses Resource A results in receiving Resource C. Another search
request using NEXT results in receiving Resource D. Another search request
using NEXT results in an error of no resource found.</p>
<p>Once the specified resource is found, the attempt FIRST, using the found
resource, moves down to a different level of the child hierarchy, and the
attempt NEXT travels across that resource sibling level, and so on.</p>
<p><strong>Retrieve the resource name of the associated package
resource.</strong> Hardware resources possibly contain both packaging resource
data and logical resource data. For each type of data that exists, the resource
names are unique. If the logical resource name is known, the package resource
name can be obtained through the associated packaging resource hierarchical
path.</p>
<p><strong>Retrieve the resource name of the associated logical
resource.</strong> Hardware resources possibly contain both logical resource
data and packaging resource data. For each type of data that exists, the
resource names are unique. If the packaging resource name is known, the logical
resource name can be obtained through the associated logical resource
hierarchical path.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>API Public Authority</em></dt>
<dd>*EXCLUDE</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Resource name</strong></dt>
<dd>OUTPUT; CHAR(32)
<p> A variable that receives the resource name.</p>
</dd>
<dt><strong>Resource criteria</strong></dt>
<dd>INPUT; CHAR(*)
<p> The criteria for which the search will be processed. See <a href=
"#HDRRTVRCRT">Format of the Resource Criteria</a> for details of this
format.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p> The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error code parameter</a>.</p>
</dd>
</dl>
<br>
<h3><a name="HDRRTVRCRT">Format of the Resource Criteria</a></h3>
<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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">CHAR(16)</td>
<td align="left" valign="top" width="20%">Handle</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Search request</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Hierarchical path</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">CHAR(32)</td>
<td align="left" valign="top">Search resource name</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRRTVRFD1">Field Descriptions</a></h3>
<p><strong>Handle.</strong> The unique value that is obtained through the
Create Handle (QRZCRTH) API. The handle allows repeated calls to obtain more
than one resource name that meets the resource criteria. The handle is created
through the Create Handle (QRZCRTH) API. The handle is required in conjunction
with the first and next search request.</p>
<p>The handle must be set to hexadecimal zeros in conjunction with the first
search request when a next search request is not needed. A handle can be used
to move across a horizontal level of a hierarchy, but it cannot be used on more
than one level.</p>
<p>For example, in <a href="#FIGRTVHWEX">Example of a Resource Hierarchy</a>,
handle 1, based on the search resource name of A, can be used on a FIRST
attempt to receive resource B, and on a NEXT attempt to receive resource C and
then resource D.</p>
<p>Handle 1, however, cannot be used on a FIRST attempt to receive resource B,
and then on a FIRST attempt to receive resource E. Handle 1 cannot be used on
two different levels of the hierarchy (B and E); this results in error message
CPF0B34 (the handle is in the wrong state for the operation) being issued. To
correct this situation, either use a different handle, or do not use a handle
by setting the field to hexadecimal zeros.</p>
<p>The user is responsible for deleting the handle when it is no longer needed.
Use the Delete Handle (QRZDLTH) API to delete the handle.</p>
<p><strong>Hierarchical path.</strong> Whether the path is for a parent, a
child, an associated packaging resource, or an associated logical resource.</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Search for a parent resource.</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">Search for a child resource.</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Search for an associated packaging resource.</td>
</tr>
<tr>
<td align="left" valign="top"><em>4</em></td>
<td align="left" valign="top">Search for an associated logical resource.</td>
</tr>
</table>
<p><strong>Search request.</strong> Whether the call is a first attempt or a
next attempt to obtain more than one list item resource name that meets the
resource criteria.</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">This is the first attempt to obtain a resource
name from a possible hierarchy of resources. This retrieves the first resource
at a subsequent level of the hierarchy.</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">This is the next attempt to obtain a resource
name from a possible hierarchy of resources. This retrieves a subsequent
resource at the same level in the hierarchy of the corresponding first
attempt.</td>
</tr>
</table>
<p><strong>Search resource name.</strong> The resource name to be used as the
focal point of a first attempt or any subsequent next attempts.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF0B3B E</td>
<td align="left" valign="top">Resource name not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0B46 E</td>
<td align="left" valign="top">Materialize failed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0B3F E</td>
<td align="left" valign="top">The reserved area is not set to binary
zeros.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0B33 E</td>
<td align="left" valign="top">The handle is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0B34 E</td>
<td align="left" valign="top">The handle is in wrong state for operation.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0B47 E</td>
<td align="left" valign="top">Hierarchical path supplied is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C19 E</td>
<td align="left" valign="top">Error occurred with receiver variable
specified.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V3R6
<hr>
<table align="center" cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"config.htm">Configuration APIs</a> | <a href="aplist.htm">API by
category</a></td>
</tr>
</table>
</body>
</html>