Start of change

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.

Table 1. TAPE_CARTRIDGE_INFO view
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.
BAR CODE
The cartridge ID was read from the bar code label on the cartridge.
SYSTEM
The cartridge ID is generated by the system.
VOLUME ID
The volume identifier is used for the 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:
*NL
The volume is a non-labeled tape.

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.
AVAILABLE
The cartridge is available for use.
DUPLICATE
The cartridge identifier exists more than once in the library device. One of the cartridges must be physically removed before the other can be used in the library device.
EJECTED
The cartridge ID is in the *EJECT category or it was manually ejected from the library device.
ERROR
The status of the cartridge ID is unknown. The cartridge cannot be found or is not in a usable condition.
INSERTED
The cartridge is inserted into the library. The Add Tape Cartridge (ADDTAPCTG) command must be issued to move the cartridge to available status.
MOUNTED
The cartridge is mounted in a tape device or in the queue ready to be loaded.
NOT AVAILABLE
The cartridge is present but not available for use.
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.
*DRIVE
The cartridge is located in a tape drive.
*SLOT
The cartridge is located in a storage slot.
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:
*BLANK
The owner ID in the tape labels is blank.
*NL
The cartridge is a non-labeled tape.

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.
NO
The cartridge is not write protected.
YES
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.
ASCII
ASCII encoding is used.
EBCDIC
EBCDIC encoding 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.
NO
The cartridge is not in an import/export slot.
YES
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