DSPTAP (Display Tape)
Purpose
The 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. Information includes an indication of whether the tape is written using improved data recording capability (IDRC) format. If the tape is not labeled, it shows the volume type and density.
If DATA(*SAVRST) is specified, the information includes a description of each object saved to the tape file and summary information about the saved objects.
The information can be printed or shown on a display device. This command allows the user to display a single file label or all file labels on a volume. Additional information can be displayed for save or restore files by specifying DATA(*SAVRST). (The user should know whether the tape being displayed contains data in the basic exchange format or in the save/restore format. But, if not known, the user can specify DATA(*LABELS) and check the data file identifiers listed. If the names of libraries are displayed, the data files are probably in the save/restore format.)
The volume for which information is displayed must be on the specified device. After some information is displayed and DATA(*SAVRST) is specified, the DSPTAP command can read more of the tape before additional information is displayed. If DATA(*SAVRST) is specified, the user is prompted to load the tape volumes on which the data continues.
Required Parameters
- DEV
- Specifies the name of the tape or media library device where the volume being displayed is located.
Optional Parameters
- VOL
- Specifies the tape volume to be displayed.
Note: If the device specified is a media library device, then the volume specified should be the cartridge identifier 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.
volume-identifier: 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.
- LABEL
- Specifies the data file identifiers of the data files on the tape whose labels are displayed. The data file identifier is stored in the file label ahead of the data in the file.
*ALL: All data file identifiers on the tape specified on the DEV parameter are shown.
data-file-identifier: Specify the data file identifier (17 alphanumeric characters maximum) of the data file for which label information is displayed. For save and restore files, the label is usually the library name, but it does not have to be.
- SEQNBR
- Specifies, for volumes with multiple files, the range of sequence numbers of the data files on tape whose label information is displayed. If LABEL(*ALL) is specified or assumed, 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.
This parameter can be specified as a list of two values (Elements 1 and 2) or as a single value (*ALL).
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.
start-file-sequence-number: The valid range of sequence numbers is 1 through 16777215. 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.
end-file-sequence-number: The valid range of sequence numbers is 1 through 16777215. The specified ending file sequence number must be greater than or equal to the starting file sequence number.
Note: 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.
Note: The ending file sequence number is ignored if a specific LABEL identifier is specified. Other Single Values
*ALL: All data file labels on the tape are displayed.
- DATA
- Specifies the type of information that is displayed.
*LABELS: The volume label and data file labels are displayed.
*SAVRST: The tape contains save and restore data. Summary information is shown for the command and each saved object. This option is valid only if the data file was created using one of the CL save commands.
- OUTPUT
- Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output. More information on this parameter is in commonly used parameters.
*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT: The output is printed with the job's spooled output.
Note: For a tape created by the Save (SAV) command, each file is printed as a separate listing. *OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.
- 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 as a model.
This parameter is valid only when OUTPUT(*OUTFILE) and DATA(*LABELS) is specified.
The name of the database file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list 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.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file to which the output of the command is directed.
- 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.
member-name: Specify the name of the file member that is to receive the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it. If the member exists, the user can add records to the end of the existing member or clear the existing member and add the records.
Element 2: Operation to Perform on Member
*REPLACE: The existing records in the specified database file member are replaced by the new records.
*ADD: The new records are added to the existing information in the specified database file member.>
- 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.
Example for DSPTAP
DSPTAP DEV(QTAPE2) LABEL(*ALL)The volume label and file labels on the tape volume that is on the tape device named QTAPE2 are displayed.
Error messages for DSPTAP
*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 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.