Retrieve Hardware Resource List (QGYRHRL, QgyRtvHdwRscList) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Resource category Input Binary(4)
5 Error code I/O Char(*)

  Service Program: QGYRHR

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Hardware Resource List (OPM, QGYRHRL; ILE, QgyRtvHdwRscList) API retrieves a list of hardware resource names and other hardware resource information fields. The list provides a summary description for each resource in the specified resource category.


Authorities and Locks

API Public Authority
*USE

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of receiver variable parameter may be specified up to the size of the receiver variable specified in the user program. If the length of receiver variable parameter specified is larger than the allocated size of the receiver variable specified in the user program, the results are not predictable. The minimum length is 16 bytes.

Format name
INPUT; CHAR(8)

The content and format of the information returned. The possible format names are as follows:

RHRL0100 Summary information for resources in each of the resource categories is returned in this format. For more information, see RHRL0100 Format.
RHRL0110 Same as RHRL0100 with the addition of a description text message ID field a status extended field and a reserved field. This format cannot be used with the Local area network resources resource category. For more information, see RHRL0110 Format.

Resource category
INPUT; BINARY(4)

The hardware resource category for which information is to be returned. Possible values are as follows:

1 All hardware resources (does not include local area network resources)
2 Communication resources
3 Local work station resources
4 Processor resources
5 Storage device resources
6 Coupled system adapter resources
7 Local area network resources
8 Cryptographic resources
9 Tape and optical resources
10 Tape resources
11 Optical resources

Note: When selecting Local area network resources, only information for token-ring resources can be obtained. Information for token-ring resources associated with a particular line description will be returned only if the Work with LAN Adapters (WRKLANADPT) command has been run with that line description specified. It is also necessary for the LAN Manager to have been activated for that line description. The LAN Manager is activated by running the Create Line Description Token-Ring Network (CRTLINTRN) or the Change Line Description Token-Ring Network (CHGLINTRN) command with keyword ACTLANMGR set to *YES. WRKLANADPT must be run again after adding a new token-ring resource in order to be able to retrieve information for that resource.

Error code
I/O; CHAR(*)

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


RHRL0100 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of resources returned
12 C BINARY(4) Length of resource entry
    CHAR(*) Resource entries
These fields repeat for each resource. BINARY(4) Resource category
BINARY(4) Family level
BINARY(4) Line type
CHAR(10) Resource name
CHAR(4) Type number
CHAR(3) Model number
CHAR(1) Status
CHAR(8) System to which adapter is connected
CHAR(12) Adapter address
CHAR(50) Description
CHAR(24) Resource kind


RHRL0110 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of resources returned
12 C BINARY(4) Length of resource entry
    CHAR(*) Resource entries
These fields repeat for each resource. BINARY(4) Resource category
BINARY(4) Family level
BINARY(4) Line type
CHAR(10) Resource name
CHAR(4) Type number
CHAR(3) Model number
CHAR(1) Status
CHAR(8) System to which adapter is connected
CHAR(12) Adapter address
CHAR(50) Description
CHAR(24) Resource kind
CHAR(7) Description text message ID
CHAR(1) Reserved
BINARY(4) Status extended


Field Descriptions

Adapter address. The network address of the LAN adapter resource.

Bytes available. The length in bytes of all data available to return. All available data is returned if enough space is provided.

Bytes returned. The length in bytes of all data actually returned.

Description. The description of the resource.

Description text message ID. The message from which the text of the Description field is obtained. This message is contained in the QCPFMSG message file. The library in which it is found is determined by *LIBL.

Family level. The relationship between adjacent returned resources. Possible values are positive integers starting with 1, incrementing as needed to match the number of existing family levels. The first three values are as follows:

1 This resource is parent to the next resource if the next resource has a resource family level of 2.
2 This resource is child to the previous resource that has a resource family level of 1, and is parent to the next resource if the next resource has a resource family level of 3.
3 This resource is child to the previous resource that has a resource family level of 2, and is grandchild to the previous resource that has a resource family level of 1. It is parent to the next resource if the next resource has a resource family level of 4.

Length of resource entry. The length, in bytes, of each resource entry.

Line type. The line type of the LAN resource. Possible values are as follows:

-1 This field does not apply to this resource.
1 Token ring.
2 Fiber distributed data interface (FDDI).

Model number. The model number of the resource. For self-configuring tape devices, this represents the emulated device model number.

Number of resources returned. The total number of resources for which information is returned by the API.

Reserved. A reserved field.

Resource category. The hardware resource category of the resource for which information is returned. If the input parameter Resource category is set to the number 1 (All hardware resources), the format field value returned here is set to one of the other more specific values. Otherwise, the returned value matches the input value. Possible values are as follows:

2 Communication resources
3 Local workstation resources
4 Processor resources
5 Storage device resources
6 Coupled system adapter resources
7 Local area network resources
8 Cryptographic resources
9 Tape and optical resources
10 Tape resources
11 Optical resources

Resource entries. The sets of information fields that are retrieved for each resource.

Resource kind. The resource kind field consists of 24 bytes of hexadecimal numbers. It can be divided into three 8-byte fields called Kind 1, Kind 2, and Kind 3. The system uses Kind 1, Kind 2, and Kind 3 to categorize the resource. The contents of the three subfields are defined as follows:

Kind 1 Returned Value
Kind could not be determined X'0000000000000000'
Not applicable X'4000000000000000'
IOP X'0000000000000001'
Controller X'0000000000000002'
Device X'0000000000000004'
Port X'0000000000000008'
Channel X'0000000000000010'
Library X'0000000000000020'
Bus controller X'0000000000000040'
IO node X'0000000000000080'
Bus X'0000000000000100'
Bus extension X'0000000000000200'
Path information unit (PIU) X'0000000000000400'
Picker (PCK) X'0000000000000800'
PCI Node X'0000000000001000'
Any kind X'4FFFFFFFFFFFFFFF'


Kind 2 Returned Value
Kind could not be determined X'0000000000000000'
Not applicable X'4000000000000000'
Workstation X'0000000000000001'
Storage X'0000000000000002'
Workstation storage X'0000000000000003'
Communications X'0000000000000004'
Workstation communications X'0000000000000005'
Storage communications X'0000000000000006'
Storage communications workstation X'0000000000000007'
Shared object clustering (SOC) X'0000000000000008'
Cryptography X'0000000000000010'
Workstation cryptography X'0000000000000011'
Storage cryptography X'0000000000000012'
Storage workstation cryptography X'0000000000000013'
Communication cryptography X'0000000000000014'
Communication workstation cryptography X'0000000000000015'
Storage communications cryptography X'0000000000000016'
Storage communications workstation cryptography X'0000000000000017'
Any kind X'4FFFFFFFFFFFFFFF'


Kind 3 Returned Value
Kind could not be determined X'0000000000000000'
Not applicable X'4000000000000000'
Display X'0000000000000001'
Printer X'0000000000000002'
DASD X'0000000000000004'
Diskette X'0000000000000008'
DASD Diskette X'000000000000000C'
Optical X'0000000000000010'
Tape X'0000000000000020'
DASD Tape X'0000000000000024'
DASD Tape Diskette X'000000000000002C'
Tape Optical X'0000000000000030'
Removable media X'0000000000000038'
DASD Tape Diskette Optical X'000000000000003C'
ISDN X'0000000000000040'
X25 X'0000000000000080'
Token ring X'0000000000000100'
SDLC X'0000000000000200'
Ethernet X'0000000000000400'
Token ring/Ethernet X'0000000000000500'
FDDI X'0000000000000800'
Token ring FDDI X'0000000000000900'
Frame relay X'0000000000001000'
Frame relay SDLC X'0000000000001200'
Cryptography X'0000000000002000'
Facsimile X'0000000000004000'
Memory X'0000000000008000'
Service processor X'0000000000010000'
Main processor X'0000000000020000'
Bus contoller X'0000000000040000'
CEC X'0000000000080000'
Control panel X'0000000000100000'
Bus adaptor X'0000000000200000'
SPD bus X'0000000000400000'
Bus extension X'0000000000800000'
System bus adapter processor X'0000000001000000'
Twin optical bus controller X'0000000002000000'
ASCII X'0000000004000000'
ASCII display X'0000000004000001'
ASCII printer X'0000000004000002'
Twinaxial X'0000000008000000'
Twinaxial display X'0000000008000001'
Twinaxial printer X'0000000008000002'
Apple X'0000000010000000'
Apple token-ring LAN X'0000000010000100'
Apple Ethernet X'0000000010000400'
Wireless X'0000000020000000'
SOC host X'0000000040000000'
SOC nonhost X'0000000080000000'
Internetwork Packet Exchange (IPX) X'0000000100000000'
File server X'0000000200000000'
ATM X'0000000400000000'
ATM Ethernet X'0000000400000400'
Backplane X'0000000800000000'
System clock X'0000001000000000'
Optical library X'0000002000000000'
PCI bus X'0000004000000000'
PHB bus controller X'0000008000000000'
RIO bus adapter X'0000010000000000'
Large read cache X'0000020000000000'
Virtual SOC IOP X'0000040000000000'
Virtual resource X'0000080000000000'
Virtual Optical X'0000080000000010'
Virtual Twin Optical bus controller X'0000080002000000'
Processor capacity X'0000100000000000'
Interactive X'0000200000000000'
Device services X'0000400000000000'
RIO controller Bus Control Chip (BuCC) X'0000800000000000'
RIO bus X'0001000000000000'
RIO SAN bus adapter X'0002000000000000'
RIO SAN bus X'0004000000000000'
RIO SAN BuCC X'0008000000000000'
RIO SAN SOC IOP X'0010000000000000'
Riser X'0020000000000000'
L3 Cache X'0040000000000000'
Backplane extender X'0080000000000000'
Capacitor card X'0100000000000000'
Any kind X'4FFFFFFFFFFFFFFF'

Start of change Note: There are cases where the Kind 3 value is composed of more than one value (bit turned on), for example: the X'0000000000000400' value means ethernet and the X'0000080000000000' value means virtual resource, so a value of X'0000080000000400' means virtual ethernet. End of change

Resource name. The name of the resource for which the information in the resource entry applies. The name can be used as input to the Retrieve Hardware Resource Information (QGYRHRI, QgyRtvHdwRscInfo) API.

Status. Whether the resource is operational or not. Possible values are as follows:

0 The status field does not apply to this resource or could not be determined.
1 Operational. Resource is operational.
2 Inoperative. Resource is not operational.
3 Not detected. Presence of resource could not be detected.

Status extended. The extended hardware status of the resource. Possible values are as follows:

0 Resource is powered off or no power is being supplied to it.
1 Resource has failed.
2 Resource is operational.
3 Resource is operational but errors have been detected.
4 Resource is not connected.
5 Resource is operational but performance is degraded.
6 Resource status is unknown currently.
7 Resource is currently disabled.
8 Resource is not installed.
10 Resource is not operational.
16 Resource is failed due to a system software error.

System to which adapter is connected. The system to which the coupled system adapter is connected.

Type number. An identifier that represents the object type of this resource. For self-configuring tape devices, this represents the emulated device type number. Exceptions: Value of *TAP implies that a self-configuring tape device is emulating a device type that contains characters outside the range of 0 to 9 and A to Z.


Error Messages

Message ID Error Message Text
CPF3C1E E Required parameter &1 omitted.
CPF3CF1 E Error code parameter not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFA280 E Resource category &1 is not valid.


API introduced: V3R7
Top | Configuration APIs | API by category