Display Tape (DSPTAP)
Where allowed to run: All environments (*ALL)
Threadsafe: NoParameters
Examples
Error messagesThe Display Tape (DSPTAP) command shows the volume label and data file label information that is contained on a standard labeled magnetic tape or the volume type and density. The information can be printed or shown on a display device. Additional information, including a description of each object saved to the tape file and summary information about the saved objects, can be displayed by specifying *SAVRST on the Data type prompt (DATA parameter).
Top
Parameters
Keyword Description Choices Notes DEV Device Name Required, Positional 1 VOL Volume identifier Character value, *MOUNTED Optional LABEL File label Character value, *ALL Optional SEQNBR Sequence number Single values: *ALL
Other values: Element listOptional Element 1: Starting file sequence number 1-16777215, *FIRST Element 2: Ending file sequence number 1-16777215, *ONLY, *LAST DATA Data type *LABELS, *SAVRST Optional OUTPUT Output *, *PRINT, *OUTFILE Optional ENDOPT End of tape option *REWIND, *UNLOAD 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
Device (DEV)
Specifies the name of the tape or media library device in which the volume being shown is placed.
This is a required parameter.
Top
Volume identifier (VOL)
Specifies the tape volume to be displayed.
If the device specified is a media library device, or a virtual tape device, then the volume specified should be the cartridge identifier or virtual volume name to be mounted and used.
- *MOUNTED
- The volume currently placed in the device is used. For a media library device, the volume to be used is the next cartridge in the category mounted by the Set Tape Category (SETTAPCGY) command. For a virtual tape device, the volume to be used is the currently mounted one, or if there is not a currently mounted volume, the next volume in loaded status in the image catalog will be used.
- character-value
- Specify the volume identifier of the labeled volume. The volume identifier read from the tape is compared to this value. If the volume identifier specified is not found on the tape, an escape message is sent.
Top
File label (LABEL)
Specifies the data file identifiers of the data files on the tape whose labels are shown. The data file identifier is stored in the label ahead of the data in the file.
- *ALL
- All data file identifiers on the tape specified on the Tape device prompt (DEV parameter) are shown.
- character-value
- Specify the data file identifier (17 alphanumeric characters maximum) of the data file for which label information is shown.
Top
Sequence number (SEQNBR)
Specifies, for volumes with multiple files, the range of sequence numbers of the data files on tape whose label information is displayed. If *ALL is specified on the File label prompt (LABEL parameter), all labels for the files within the specified sequence number range are displayed after the specified starting file sequence number.
If a specific LABEL identifier is specified, it is compared with the label identifier of the data file specified by the starting sequence number. If the identifiers do not match, an error message is sent.
Single values
- *ALL
- All data file labels on the tape are displayed.
Element 1: Starting file sequence number
- *FIRST
- The data file labels being displayed begin with the first file (or the only file) on the tape.
- 1-16777215
- Specify the starting file sequence number. If the specified starting file sequence number is not found on the tape, an error message is sent.
Element 2: Ending file sequence number
- *LAST
- The range of data file labels being displayed begins with the specified starting file sequence number and ends with the last data file label on tape.
- *ONLY
- Only the file specified in the starting sequence is displayed.
- 1-16777215
- Specify the ending file sequence number. The specified ending file sequence number must be greater than or equal to the starting file sequence number.
The ending file sequence number is ignored for OUTPUT(*) for an interactive job. The user has control and can continue to display information or end whenever they desire.
The ending file sequence number is ignored if a specific LABEL identifier is specified.
Top
Data type (DATA)
Specifies the type of information that is shown.
- *LABELS
- The volume label and data file labels are shown.
- *SAVRST
- Shows the summary information about the command and each saved object.
Top
Output (OUTPUT)
Specifies whether the output from the command is displayed at the requesting work station 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).
- The output is printed with the job's spooled output.
- *OUTFILE
- The output is directed to the database file specified on the OUTFILE parameter.
Top
End of tape option (ENDOPT)
Specifies the operation that is automatically performed on the tape volume after the operation ends. If more than one volume is included, this parameter applies only to the last tape volume used; all other tape volumes are rewound and unloaded when the end of the tape is reached.
- *REWIND
- The tape is automatically rewound, but not unloaded, after the operation has ended.
- *UNLOAD
- The tape is automatically rewound and unloaded after the operation ends.
Top
File to receive output (OUTFILE)
Specifies the qualified name of the database file to which the information about the tape files 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 QATADOF in QSYS as a model with the format name of QTADOUTF.
This parameter is valid only when OUTPUT(*OUTFILE) and DATA(*LABELS) 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 OUTMBR(*FIRST) 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
DSPTAP DEV(QTAPE2) LABEL(*ALL)This command displays the volume label and file labels on the tape volume that is on the tape device named QTAPE2.
Top
Error messages
*ESCAPE Messages
- CPD375A
- Media error on save media.
- CPF3704
- Request ended; data management error occurred.
- CPF3743
- File cannot be restored, displayed, or listed.
- CPF3792
- Information not displayed. Error occurred.
- CPF3793
- Machine or ASP storage limit reached.
- CPF6708
- Command ended due to error.
- CPF6718
- Cannot allocate device &1.
- CPF6721
- Device &1 not a tape device.
- CPF6723
- File not found on volume &2 on device &1.
- CPF6724
- File label &5 not found on volume &2.
- CPF6745
- Device &1 not a media library device.
- CPF6751
- Load failure occurred on device &4.
- CPF6760
- Device &1 not ready.
- CPF6772
- Volume on device &1 cannot be processed.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9847
- Error occurred while closing file &1 in library &2.
- CPF9850
- Override of printer file &1 not allowed.
- CPF9851
- Overflow value for file &1 in &2 too small.
Top