ASP_VARY_INFO view
The ASP_VARY_INFO view returns one row for each step associated with a vary on or vary off operation for all independent ASP devices.
The values returned for the columns in the view are similar to the values returned by the Display ASP Status (DSPASPSTS) CL command.
Authorization: Rows are returned for any device description where the caller has *USE authority.
The following table describes the columns in the view. The system name is VARY_INFO. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
IASP_NAME | IASP_NAME | VARCHAR(10) | The name of the ASP device description. |
OPERATION_NUMBER | OP_NUMBER | INTEGER | A value for an instance of a vary on or vary off operation, where the highest number is the most recent operation. The most recent 64 operations are returned. |
OPERATION_TYPE | OP_TYPE | VARCHAR(8) | The type of vary operation.
|
OPERATION_STATE | OP_STATE | VARCHAR(8) | The state of the entire operation.
|
STEP | STEP |
VARGRAPHIC(50)
CCSID 1200 |
The description of the operation step. |
STEP_STATE | STEP_STATE | VARCHAR(8) | The state of the operation step.
|
START_TIMESTAMP | START | TIMESTAMP | The timestamp for the start of this operation step. |
END_TIMESTAMP | END |
TIMESTAMP
Nullable |
The timestamp for the end of this operation step. Contains the null value if the operation step has not completed or may never complete. |
DURATION | DURATION |
DECIMAL(12,6)
Nullable |
The time duration, in seconds, of this operation step. Contains the null value if the operation step has not completed or may never complete. |
JOB_NAME | JOB_NAME |
VARCHAR(28)
Nullable |
The qualified job name that initiated this vary operation.
Contains the null value if the job name is not available. |
IASP_NUMBER | IASPNUM | INTEGER | The number associated with the ASP device. |
Example
- Return the steps from available vary on operations, listed from most expensive to least
expensive.
SELECT * FROM QSYS2.ASP_VARY_INFO WHERE OPERATION_TYPE = 'VARY ON' ORDER BY IASP_NAME, DURATION DESC;
- Create a table to retain vary on historical data. Populate it with the current available
values.
CREATE TABLE VARY_HISTORY AS (SELECT * FROM QSYS2.ASP_VARY_INFO) WITH DATA;
- Update the table that contains vary on historical data with any new
rows.
MERGE INTO VARY_HISTORY H USING QSYS2.ASP_VARY_INFO N ON H.OPERATION_NUMBER = N.OPERATION_NUMBER WHEN NOT MATCHED THEN INSERT VALUES (N.IASP_NAME, N.OPERATION_NUMBER, N.OPERATION_TYPE, N.OPERATION_STATE, N.STEP, N.STEP_STATE, N.START_TIMESTAMP, N.END_TIMESTAMP, N.DURATION, N.JOB_NAME, N.IASP_NUMBER);