Retrieve Hardware Resource Relative (QRZRTVR) API


  Required Parameter Group:

1 Resource name Output Char(32)
2 Resource criteria Input Char(*)
3 Error code I/O Char(*)

   Default Public Authority: *USE

  Threadsafe: No

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.

You can use this API to do the following:

Example of a Resource Hierarchy

Example of a resource hierarchy

In Example of a Resource Hierarchy, 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.

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).

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.

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.

Retrieve the resource name of the associated package resource. 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. In logical partitions that contain virtual hardware, it is possible that this type of search would result in a resource not found error.

Retrieve the resource name of the associated logical resource. 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.


Authorities and Locks

API Public Authority
*USE

Required Parameter Group

Resource name
OUTPUT; CHAR(32)

A variable that receives the resource name.

Resource criteria
INPUT; CHAR(*)

The criteria for which the search will be processed. See Format of the Resource Criteria for details of this format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of the Resource Criteria

Offset Type Field
Dec Hex
0 0 CHAR(16) Handle
16 10 BINARY(4) Search request
20 14 BINARY(4) Hierarchical path
24 18 CHAR(32) Search resource name


Field Descriptions

Handle. 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.

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.

For example, in Example of a Resource Hierarchy, 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.

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.

The user is responsible for deleting the handle when it is no longer needed. Use the Delete Handle (QRZDLTH) API to delete the handle.

Hierarchical path. Whether the path is for a parent, a child, an associated packaging resource, or an associated logical resource.

1 Search for a parent resource.
2 Search for a child resource.
3 Search for an associated packaging resource.
4 Search for an associated logical resource.

Search request. 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.

1 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.
2 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.

Search resource name. The resource name to be used as the focal point of a first attempt or any subsequent next attempts.


Error Messages

Message ID Error Message Text
CPF0B3B E Resource name not found.
CPF0B46 E Materialize failed.
CPF0B3F E The reserved area is not set to binary zeros.
CPF0B33 E The handle is not valid.
CPF0B34 E The handle is in wrong state for operation.
CPF0B47 E Hierarchical path supplied is not valid.
CPF24B4 E Severe error while addressing parameter list.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V3R6

[ Back to top | Configuration APIs | APIs by category ]