Display Tape Cartridge (DSPTAPCTG)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Tape Cartridge (DSPTAPCTG) command displays the attributes of tape cartridges.

Top

Parameters

Keyword Description Choices Notes
DEV Library device Name Required, Positional 1
CTG Cartridge ID Single values: *ALL
Other values (up to 40 repetitions): Character value
Optional
CGY Category Single values: *SHARE400, *INSERT, *EJECT
Other values: Element list
Optional
Element 1: Category name Character value, *ALL, *NOSHARE, *IPL, *NL, *SYSGEN, *CNV
Element 2: Category system Character value, *CURRENT, *ALL
OUTPUT Output *, *PRINT, *OUTFILE Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
Top

Library device (DEV)

Specifies the library device to be used. The device description must have been created previously on the system using the Create Device Media Library (CRTDEVMLB) command.

This is a required parameter.

name
Specify the name of the library device.
Top

Cartridge ID (CTG)

Specifies 1 to 40 cartridge identifiers to be displayed.

Note: The cartridge identifier should represent the external identifier if the library device has a bar code scanner to read external identifiers.

Single values

*ALL
All tape cartridges in the device or in the category specified are displayed.

Other values (up to 40 repetitions)

generic-identifier
Specify the generic name of the cartridge identifier. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all cartridge identifiers with names that begin with the generic prefix. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete cartridge identifier.
identifier
Specify the cartridge identifier.
Top

Category (CGY)

Specifies the category of tape cartridges to be shown.

Single values

*SHARE400
The cartridge identifiers in the *SHARE400 category are displayed. A cartridge in this category can be shared with other systems attached to the same device.
*INSERT
The cartridge identifiers in the *INSERT category are displayed. A cartridge in this category has been placed in the library device, but its identifier has not been added to the system.
*EJECT
The cartridge identifiers in the *EJECT category are displayed. A cartridge in this category has had its identifier removed from the system and is no longer usable.

Element 1: Category name

*ALL
All categories are searched for the cartridge identifiers specified in the CTG parameter and all are displayed.
*NOSHARE
The cartridge identifiers in the *NOSHARE category are displayed. A cartridge with this identifier cannot be shared with other systems.
*IPL
The cartridge identifiers in the *IPL category are displayed. A cartridge with this identifier can be used for an alternate IPL.
*NL
The cartridge identifiers in the *NL category are displayed. A cartridge with this identifier is used as a non-labeled tape.
*SYSGEN
The cartridge identifiers in the *SYSGEN category are displayed. If the library device is in *SYSGEN mode, cartridges cannot be moved from the *SYSGEN category.
*CNV
The cartridge identifiers in the *CNV category are displayed. A cartridge in this category is for use with the convenience station.
character-value
Specify the name of a user-defined category. This category name must have been created previously with the Create Tape Category (CRTTAPCGY) command.

Element 2: Category system

This element identifies the system to which the category belongs. The system name is obtained from the pending system name field of a Display Network Attributes (DSPNETA) command. If there is no pending system name, the current system name attribute is used.

***** Attention *****************************
If the system name is changed, all category
information associated with all tape
cartridges in library devices are not valid.
*********************************************

*CURRENT
The system currently executing the command.
*ALL
All system names that own categories available to the system running this command are used.
character-value
Specify the name of the system that the category belongs to.
Top

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting workstation, printed to an output file, or printed with the job's spooled output.

*
The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to a database file specified on the OUTFILE parameter. The file must have the same format as database file QSYS/QATAVOF.
Top

File to receive output (OUTFILE)

Specifies the qualified name of the database file to which the information about the tape volumes is directed. If the file does not exist, this command creates a database file in the specified library. If a new file is created, the system uses QATAVOF in QSYS as a model with the format name of QTAVOLOF.

Note: This parameter is valid only when OUTPUT(*OUTFILE) is specified.

Qualifier 1: File to receive output

name
Specify the name of the database file to be used.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Output member options (OUTMBR)

Specifies the name of the database file member to which the output is directed when OUTPUT(*OUTFILE) is specified.

Element 1: Member to receive output

*FIRST
The first member in the file receives the output. If this value is specified and the member does not exist, the system creates a member with the name of the file specified on the OUTFILE parameter.
name
Specify the name of the file member that is to receive the output. If a member name is specified and the member does not exist, the system creates it.

Element 2: Replace or add records

*REPLACE
The existing records in the specified database file member are replaced by the new records.
*ADD
The system adds the new records at the end of the existing member.
Top

Examples

Example 1: Displaying the Tape Cartridges in the *SHARE400 Category

DSPTAPCTG   DEV(LIB01)  CGY(*SHARE400)  OUTPUT(*)

This command displays the attributes of all tape cartridges in the *SHARE400 category on the work station display.

Example 2: Displaying the Tape Cartridge for VOL3

DSPTAPCTG   DEV(LIB01)  CTG(VOL3)  OUTPUT(*)  CGY(*ALL)

This command displays the attributes of the cartridge identifier VOL3.

Top

Error messages

*ESCAPE Messages

CPF6708
Command ended due to error.
CPF6711
Command not allowed
CPF6718
Cannot allocate device &1.
CPF6745
Device &1 not a media library device.
CPF67A6
Category does not exist
CPF67D2
Cartridge command was not successful.
CPF67D4
Category not available
CPF67E4
Library device function not successful
CPF67E6
Volume &2 is not correct
CPF67EA
Function not successful
CPF67EC
Library device description &1 does not exist
CPF67ED
Library device &1 not available
CPF67F5
Duplicate cartridge or virtual volume name found
CPF9814
Device &1 not found.
CPF9825
Not authorized to device &1.
Top