Retrieve Device Status (QTARDSTS) API

  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Device Status (QTARDSTS) API retrieves dynamic status information for the specified device and for any currently mounted tape cartridge. The device description must be varied on. The resource that is associated with a specified tape media library device description must currently exist on the system.

Note: If the device status has been changed by a manual operation or by another system sharing the device, the information will not be accurate.

The QTARDSTS API currently supports the following device types:


Authorities and Locks

Device Description 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 8 bytes.

Format name
INPUT; CHAR(8)

The content and format of the information being returned.

The RDST0100 format must be used for the tape device status information. See RDST0100 Format to view the information returned for this format.

Device description
INPUT; CHAR(10)

The name of the device description for which the data is returned.

Resource name
INPUT; CHAR(10)

When the Device description parameter specifies a tape media library device description, this parameter can be used to specify the resource name of a tape device within the tape media library for which data is returned. This parameter must be set to blanks when only the tape media library information is needed, or when the device description is for a tape device.

Error code
I/O; CHAR(*)

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


RDST0100 Format

The following table shows the information that is returned for the RDST0100 format. For more details about the fields in the following table, see Field Descriptions.



Current cartridge information

The following table shows the current cartridge information that is returned. This information is only available when a command was previously issued to use the device and one or more of the following conditions are present:

This information is not returned when the specified device description is a tape media library and no device resource is provided. The information returned may not be accurate if there was an error reported during the previously issued command. For more details about the fields in the following table, see Field Descriptions.



Device information

The following table shows the device information that is returned. This information is only available when there is an active job using the tape device or the specified device description is a tape media library and a device resource is provided that is owned by the tape media library. For more details about the fields in the following table, see Field Descriptions.



Label information

The following table shows the label information that is returned. This information is only available when there is an open tape file for the tape device or the device is in leave processing. This information is not returned when the specified device description is a tape media library and no device resource is provided. For more details about the fields in the following table, see Field Descriptions.



Position information

The following table shows the position information that is returned. This information is only available when there is an open tape file for the tape device or the device is in leave processing. This information is not returned when the specified device description is a tape media library and no device resource is provided. For more details about the fields in the following table, see Field Descriptions.



Tape media library information

The following table shows the tape media library information that is returned. This information is only available when the specified device description is a tape media library and a command was previously issued to use the tape media library. For more details about the fields in the following table, see Field Descriptions.

Note: For a 3494 tape media library device the tape media library information is only updated when a DSPTAPSTS command is issued.



Field Descriptions

At logical BOT. Whether the media is currently positioned at logical BOT. For standard labeled format tapes this indicator is set whenever the tape is positioned within the first label group. For non-labeled format tapes this indicator is set whenever the tape is positioned within the first file on tape. Possible values follow:

At logical EOT. Whether the media is currently positioned at logical EOT. Possible values follow:

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Cartridge ID. The Cartridge identifier for the currently mounted media. This field will be blank if the tape does not have a bar code label or if it is not in a tape media library with a bar code reader.

Cartridge order for category.When there is a category mounted on the specified resource within a tape media library this field shows the cartridge order. Possible values follow:

Category is mounted. Whether there currently is a category mounted on the device. Possible values follow:

Current cartridge density. The density of the currently mounted media.

Current command. The current command executed against the tape device. If the specific command is not known, one of the following values is returned:

Current file sequence number. The current sequence number of the file being processed. This field will be blanks if no files have been processed yet.

Current multi-volume sequence number. The current multi-volume sequence number for the mounted media. This field will be blank if no media is mounted or if the tape is a non-labeled tape.

Current tape mark count. The current number of tape marks away from BOT.

Image catalog name.The name of the image catalog loaded on the virtual tape device. When there is no image catalog loaded, the field will be set to blanks.

In leave processing. Whether the last completed tape command used an ending option of *LEAVE. Possible values follow:

Job using the device. The qualified job name of the job currently using the device. This field will be all blanks if there is no active job using the device.

Label type. The label format of the currently mounted tape. Possible values follow:

Last processed HDR1/TRL1 label. The last processed HDR1 or TRL1 label on the media. This field will be all blanks for a Non-labeled tape, or if no labels have been processed yet.

Last processed HDR2/TRL2 label. The last processed HDR2 or TRL2 label on the media. This field will be all blanks for a Non-labeled tape or if no labels have been processed yet.

Length of current cartridge information entry. When current cartridge information is available this field is set to the length, in bytes, of a single current cartridge information entry. A value of zero is returned if the current cartridge information is not available.

Length of device information entry. When device information is available this field is set to the length, in bytes, of a single device information entry. A value of zero is returned if the device information is not available.

Length of label information entry. When label information is available this field is set to the length, in bytes, of a single label information entry. A value of zero is returned if the label information is not available.

Length of position information entry. When position information is available this field is set to the length, in bytes, of a single position information entry. A value of zero is returned if the position information is not available.

Length of tape media library information entry. When tape media library information is available this field is set to the length, in bytes, of a single tape media library information entry. A value of zero is returned if the tape media library information is not available.

Mounted cartridge ID. For a resource within a tape media library device the cartridge identifier for the cartridge that was last mounted is returned. When the specified device description is a tape device, the field is set to blanks.

Mounted category name. The name of the category mounted on the specified resource within a tape media library. When there is no category mounted, the field is set to blanks.

Mounted category system. The name of the system owning the category mounted on the specified resource within a tape media library. When there is no category mounted or the category is not owned by a specific system, the field is set to blanks.

Mount identifier. The mount identifier assigned to the category mounted on the specified resource within a tape media library. When there is no mount identifier assigned the value *NONE is returned. When there is no category mounted, the field is set to blanks.

Mounted volume ID. The name of the volume which is currently mounted on the virtual tape device. When there is no image catalog loaded or no volume mounted, the field is set to blanks.

Number of available slots. The number of empty storage slots in the tape media library.

Number of current cartridge information entries. If current cartridge information is available, a value of one is returned. A value of zero is returned if the current cartridge information is not available.

Number of device information entries. If device information is available, a value of one is returned. A value of zero is returned if the device information is not available.

Number of high capacity slots. The number of high capacity storage slots in the tape media library.

Number of import/export stations. The number of import/export stations for the tape media library.

Number of label information entries. If label information is available, a value of one is returned. A value of zero is returned if the label information is not available.

Number of position information entries. If position information is available, a value of one is returned. A value of zero is returned if the position information is not available.

Number of tape media library information entries. If tape media library information is available, a value of one is returned. A value of zero is returned if the tape media library information is not available.

Number of used slots. The number of storage slots in the tape media library that are currently being used.

Offset to current cartridge information. The offset, in bytes, to the current cartridge information. A value of zero is returned if the current cartridge information is not available.

Offset to device information. The offset, in bytes, to the current job information. A value of zero is returned if the device information is not available.

Offset to label information. The offset, in bytes, to the label information. A value of zero is returned if the label information is not available.

Offset to position information. The offset, in bytes, to the position information. A value of zero is returned if the position information is not available.

Offset to tape media library information. The offset, in bytes, to the tape media library information. A value of zero is returned if the tape media library information is not available.

Tape Encoding. The encoding scheme being used for the mounted media. Possible values follow:

Target category. The category that the cartridges will be changed to after they are used. When there is no category mounted, the field is set to blanks.

Start of change Target category option. Specifies when the category will be changed to the target category. Possible values follow:

End of change

Target system. The name of the system owning the target category. When there is no category mounted, the field is set to blanks.

Volume ID. The Volume identifier for the currently mounted media. This field will be blank for non-labeled tapes or if the tape cannot be read.

Volume label. The volume label for the currently mounted media. This field will be blank for a non-labeled tape or if the tape cannot be read.

Write protected. Whether the mounted media is write protected. Possible values follow:



Error Messages



API introduced: V5R2

[ Back to top | Backup and Recovery APIs | APIs by category ]