Start of change

HARDWARE_RESOURCE_INFO table function

The HARDWARE_RESOURCE_INFO table function returns information about configured hardware resources.

The information returned is similar to the detail available through the STRSST Hardware Service Manager interface and from the Retrieve Hardware Resource List (QGYRHRL, QgyRtvHdwRscList) and Retrieve Hardware Resource Information (QGYRHRI, QgyRtvHdwRscInfo) APIs.

Authorization: None required.

Read syntax diagramSkip visual syntax diagramHARDWARE_RESOURCE_INFO( RESOURCE_CATEGORY =>  resource-category,DETAILED_INFO => detailed-info,IGNORE_ERRORS => ignore-errors)
The schema is QSYS2.
resource-category
A character or graphic string expression that identifies the category of resource information to be returned.
ADAPTER
Coupled system adapter resources
ALL
Information for all resource categories
COMM
Communication resources
CRYPTO
Cryptographic resources
OPTICAL
Optical resources
PROCESSOR
Processor resources
STORAGE
Storage device resources, including tape and optical resources
TAPE
Tape resources
WORKSTATION
Local workstation resources
detailed-info
A character or graphic string expression that indicates the type of information to be returned.
NO
Only the basic information is returned for the resource. This is the information in the columns prior to the SERIAL_NUMBER column. This is the default.
YES
All the information available for the resource is returned.
ignore-errors
A character or graphic string expression that identifies what to do when an error is encountered.
NO

An error is returned.

YES
A warning is returned.
No row is returned when an error is encountered. This is the default.

The result of the function is a table containing multiple rows with the format shown in the following table. All the columns are nullable.

Table 1. HARDWARE_RESOURCE_INFO table function
Column Name Data Type Description
ID INTEGER A generated unique identifier for this row in the result set.
PARENT_ID INTEGER The ID of the parent to this resource.

Contains the null value if this resource is not a child of another resource.

RESOURCE_CATEGORY VARCHAR(11) The hardware resource category of the resource for which information is returned.
ADAPTER
Coupled system adapter resources.
COMM
Communication resources.
CRYPTO
Cryptographic resources.
OPTICAL
Optical resources.
PROCESSOR
Processor resources.
STORAGE
Storage device resources.
TAPE
Tape resources.
WORKSTATION
Local workstation resources.
RESOURCE_NAME VARCHAR(10) The name of the resource.
STATUS VARCHAR(12) Whether the resource is operational.
INOPERATIVE
Resource is not operational.
NOT DETECTED
Presence of resource could not be detected.
OPERATIONAL
Resource is operational.

Contains the null value if STATUS does not apply to this resource or could not be determined.

EXTENDED_STATUS VARCHAR(14) The extended hardware status of the resource.
DEGRADED
Resource is operational but performance is degraded.
DISABLED
Resource is currently disabled.
ERROR
Resource is operational but errors have been detected.
FAILED
Resource has failed.
INOPERATIVE
Resource is not operational.
NO POWER
Resource is powered off or no power is being supplied to it.
NOT CONNECTED
Resource is not connected.
NOT INSTALLED
Resource is not installed.
OPERATIONAL
Resource is operational.
SOFTWARE ERROR
Resource is failed due to a system software error.

Contains the null value if STATUS does not apply to this resource or could not be determined.

DEVICE_TYPE VARCHAR(4) An identifier that represents the object type of this resource. For self-configuring tape devices, this represents the emulated device type number.

A value of *TAP indicates 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.

Contains the null value if a value is not available.

DEVICE_MODEL VARCHAR(3) The model number of the resource. For self-configuring tape devices, this represents the emulated device model number.

Contains the null value if a value is not available.

ADAPTER_SYSTEM VARCHAR(8) The system to which the coupled system adapter is connected.

Contains the null value if a value is not available.

LAN_ADAPTER_ADDRESS VARCHAR(12) The network address of the LAN adapter resource.

Contains the null value if a value is not available.

LINE_TYPE VARCHAR(5) The line type of the LAN resource.
FDDI
Fiber distributed data interface.
TOKEN
Token ring.

Contains the null value if the resource has no line type.

TEXT_DESCRIPTION VARCHAR(50) The description of the resource.

Contains the null value if there is no descriptive text.

MESSAGE_ID CHAR(7) The message from which TEXT_DESCRIPTION is obtained. This message is in the QCPFMSG message file in *LIBL.

Contains the null value if there is no descriptive text.

RESOURCE_KIND BINARY(24) 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.
RESOURCE_KIND1 BINARY(8) The value for Kind 1.
RESOURCE_KIND2 BINARY(8) The value for Kind 2.
RESOURCE_KIND3 BINARY(8) The value for Kind 3.
Non-null values can be returned for the following columns when DETAILED_INFO is YES
SERIAL_NUMBER VARCHAR(15) The expanded unique number based on the manufacturing sequence for the resource.
SERIAL_NUMBER_SHORT VARCHAR(10) A unique number based on the manufacturing sequence for the resource.
PART_NUMBER VARCHAR(12) A manufacturing identifier that represents similar types of hardware.

Contains the null value if the column does not apply to the resource.

BUS_NUMBER INTEGER A numerical representation of the path connection of the system processor to the card.

Contains the null value if the column does not apply to the resource.

BOARD_NUMBER INTEGER A numerical representation of a section of the bus into which the card is plugged.

Contains the null value if the column does not apply to the resource.

CARD_NUMBER INTEGER A numerical representation of the location of the card on the bus.

Contains the null value if the column does not apply to the resource.

CARD_POSITION VARCHAR(5) The physical location where the device or feature is plugged into the bus.

Contains the null value if the column does not apply to the resource.

FRAME_ID VARCHAR(4) The identifier of a frame resource.

Contains the null value if the column does not apply to the resource.

LOCATION_CODE VARCHAR(79) The physical location of the hardware resource in the system.
The location code field is a sequence of 0 or more location labels that when followed in order, lead to the resource location. This is the place someone could go to view, remove, or replace the piece of hardware. Location labels are etched, silk screened, or marked in other ways on hardware. The following location labels might be shown in the location code field (n represents a numerical or alphabetical identifier):
Utttt.mmm.sssssss Unit location
Pnn Planar location
Cnn Card location
Tnn Port location
Dnn Device location
Vnnn Virtual planar
Wnnnnnnnnnnnnnnnn Worldwide port name
Lnn Logical path location
LOCATION_CODE (continued)  
Following are the descriptions of the location labels:
Unit location Value of the unit enclosure identifier composed of uppercase alphabetic characters and digits. This value will often be composed of the machine type (tttt), model (mmm) and serial number (sssssss).
Planar location Decimal value of the planar identifier within the unit.
Card location The decimal value of the position of the card within the hardware package. This can be followed by additional card location labels that would identify the decimal value of additional card positions of the resource on the card.
Port location The decimal value of the port location within the resource.
Device location The decimal value of the position of the device within the hardware package.
Virtual planar The decimal value of the position of the virtual planar resource within the hardware package.
Worldwide port name The hexadecimal value of the worldwide port name of the resource within the hardware package. This value is usually present for fibre channel devices. It will be blank for fibre channel adapters. See the Retrieve Resource Information (QRZRRSI) API and key value 169 for fibre channel adapters.
Logical path location The decimal value of the logical path of the resource within the hardware package. This can be followed by additional logical path location labels that would identify the decimal value of additional logical path data of the resource on the hardware package.

This column is available only if the system supports the location code format and if the value applies for the resource Otherwise the null value is returned.

IO_BUS_ADDRESS INTEGER The I/O bus address of the resource.

Contains the null value if the column does not apply to the resource.

ADAPTER_ADDRESS INTEGER The adapter address of the resource.

Contains the null value if the column does not apply to the resource.

DEVICE_ADDRESS INTEGER The device address of the resource.

Contains the null value if the column does not apply to the resource.

DEVICE_POSITION VARCHAR(5) The relative device position of the resource.

Contains the null value if the column does not apply to the resource.

CONTROLLER_ADDRESS INTEGER The controller address of the resource.

Contains the null value if the column does not apply to the resource.

SYSTEM_PROCESSOR_
FEATURE_CODE
CHAR(4) The processor feature code level of the system. A value is returned for this column only if the RESOURCE_KIND3 value of the hardware resource indicates that the resource provides system information (X'0000000000080000').

Contains the null value if the column does not apply to the resource.

PROCESSOR_FEATURE_CODE CHAR(4) The processor feature, which corresponds to the processor capacity of the system.

Contains the null value if the column does not apply to the resource.

INTERACTIVE_FEATURE_CODE CHAR(4) The interactive feature of the system. This feature defines the portion of the processor that can be used to perform interactive work.

Contains the null value if the column does not apply to the resource.

SHARED_SESSION_NUMBER INTEGER The shared session number of the resource.

Contains the null value if the column does not apply to the resource.

PORT_NUMBER INTEGER The port number of the resource.

Contains the null value if the column does not apply to the resource.

LAN_SPEED VARCHAR(12) The LAN speed for communications ports.
4M
16M
4M AND 16M
25M
34M
45M
100M
155M
10M AND 100M
10M TO 1G
1G
10G
1G AND 10G
25G
40G
50G
56G
100G
1G TO 100G
1G TO 25G

Contains the null value if the column does not apply to the resource.

LINK_AGGREGATION VARCHAR(3) Whether ports can be aggregated to compose an aggregate link.
NO
Link aggregation is not supported.
YES
Link aggregation is supported.

Contains the null value if the column does not apply to the resource.

DEFAULT_MAC_ADDRESS BINARY(6) The default MAC address of a LAN port.

Contains the null value if the column does not apply to the resource.

Example

  • Return full information about tape resources.
    SELECT * FROM TABLE (QSYS2.HARDWARE_RESOURCE_INFO(RESOURCE_CATEGORY => 'TAPE',
                                                      DETAILED_INFO => 'YES'));
End of change