![Start of change](./delta.gif)
TAPE_CARTRIDGE_INFO view
The TAPE_CARTRIDGE_INFO view returns information about tape cartridges.
This information is similar to the information available through the Display Tape Cartridge (DSPTAPCTG) CL command and the Retrieve Cartridge Information (QTARCTGI) API.
Authorization: The caller must have *USE authority to the device description.
The following table describes the columns in the view. If a device cannot be allocated to access its information, a row containing only the device name is returned. The system name is TAPE_INFO. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
DEVICE_NAME | DEVICE | VARCHAR(10) | The name of the tape library device. |
CARTRIDGE_ID | CTG_ID | VARCHAR(6) | The identifier of the cartridge. |
CARTRIDGE_ID_SOURCE | CTG_ID_SRC | VARCHAR(9) | The type of cartridge ID.
|
VOLUME_ID | VOLUME_ID | VARCHAR(6) Nullable
|
The volume identifier for the cartridge that was read from the
tape volume labels. Can contain the following special value:
Contains the null value if the volume ID is not known. |
MEDIA_TYPE | MEDIA_TYPE | VARCHAR(2) Nullable
|
The media type read from the bar code label on the cartridge.
Contains the null value if the media type is not available. |
CATEGORY | CATEGORY | VARCHAR(10) | The category assigned to the cartridge. |
CATEGORY_SYSTEM | CAT_SYSTEM | VARCHAR(8) Nullable
|
The name of the system that owns the category assigned to the
cartridge. Contains the null value if the cartridge is assigned to a category that does not have an owner. |
STATUS | STATUS | VARCHAR(13) | The status of the cartridge.
|
CHANGE_TIMESTAMP | CHANGED | TIMESTAMP(0) Nullable
|
The timestamp when the cartridge was last used for output
operations. Contains the null value if a change timestamp is not available. |
REFERENCE_TIMESTAMP | REFERENCED | TIMESTAMP(0) Nullable
|
The timestamp the cartridge was last used for input or output
operations. Contains the null value if the cartridge has not been used. |
LOCATION | LOCATION | VARCHAR(10) Nullable
|
The current location of the cartridge. This can be either a slot
number or a tape resource name. Contains the null value if the cartridge is located in a storage slot but the slot number is not known, or if the cartridge is located in a tape drive but the drive location is not known. |
LOCATION_INDICATOR | LOC_IND | VARCHAR(6) | Where the tape cartridge is located.
|
OWNER_ID | OWNER_ID | VARCHAR(17) Nullable
|
The owner ID specified when the tape was initialized. This
information is read from the tape volume labels. Can contain the following special values:
Contains the null value if the owner ID is not known. |
DENSITY | DENSITY | VARCHAR(10) Nullable
|
The last known cartridge density. Contains the null value if the density is not known. |
WRITE_PROTECTED | PROTECTED | VARCHAR(3) Nullable
|
Whether the cartridge is write protected.
Contains the null value if the cartridge write protect status is not known. |
ENCODING | ENCODING | VARCHAR(6) Nullable
|
The encoding of the tape volume. The encoding of a tape volume is
determined when the Initialize Tape (INZTAP) command is used.
Contains the null value if the encoding is not known. |
IMPORT_EXPORT_SLOT | IMP_EXP | VARCHAR(3) | Whether the cartridge is in an Import/Export slot.
|
Example
Return information about all tape cartridges that do not currently have a status of AVAILABLE.
SELECT * FROM QSYS2.TAPE_CARTRIDGE_INFO
WHERE STATUS <> 'AVAILABLE';
![End of change](./deltaend.gif)