Command reference / save

CHKTAP

Check Tape

Checks a tape volume and can position it at a specified file sequence without reading the file into an application.

Allowed environments: *ALL. Positional parameters: 4.

Parameters

DEV Dev

Sets the device in which the volume being checked is placed.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase
name
Enter the name of the tape or media library device.

VOL Vol

Controls whether the volume identifier on the tape is being checked. This is valid only for a standard labeled tape. Note: 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 tape volume name to be mounted and used.

Type
*CHAR
Required
No
Default
*MOUNTED
Length
6
Case
Uppercase

Suggested / special values: *MOUNTED

*MOUNTED
The volume identifier on the tape is not checked. The volume on 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.
character-value
If the device specified in the DEV parameter is a stand-alone tape device, specify the volume identifier of the labeled volume. The volume identifier read from the tape is compared to this value.

SEQNBR Seqnbr

Controls whether a check is made for a specific sequence number of a data file on the tape.

Type
*UINT4
Required
No
Default
*NONE
Range
1 to 16777215
Case
Uppercase

Suggested / special values: *NONE, *FIRST, *NEXT, *SEARCH

*NONE
No check is made for a file on this volume.
*FIRST
A check is made for the first file on this volume.
*NEXT
A check is made for the next file on this volume. If the current sequence number is at the beginning of the volume, this value checks the first file on that volume.
*SEARCH
A search is made for a data file that has an identifier that matches the value for the File label (LABEL) parameter.
integer
Enter the sequence number of the data file to verify on this tape. If the sequence number is not found on the tape, an escape message is sent. Valid values range from 1 through 16777215.

LABEL Label

Controls whether a label identifier is checked. If a label is specified, a sequence number must be specified for the Sequence number (SEQNBR) parameter.

Type
*CHAR
Required
No
Default
*NONE
Length
17
Case
Uppercase

Suggested / special values: *NONE

*NONE
No check is made for a label identifier on the tape. *NONE must be specified both here and for the Creation date (CRTDATE) parameter for a volume that is not labeled.
character-value
Enter the data file identifier (17 characters maximum) of the data file to check. If a label is specified, *SEARCH or a sequence number must be specified for the Sequence number (SEQNBR) parameter.

CRTDATE Crtdate

Controls whether the date the file was created is checked. If *NONE is specified for the Sequence number (SEQNBR) parameter, *NONE must also be specified here.

Type
*DATE
Required
No
Default
*NONE
Case
Uppercase

Suggested / special values: *NONE

*NONE
The date the file was created is not checked. *NONE must be specified both here and for the File label (LABEL) parameter for a volume that is not labeled.
date
Enter the date that must match the date of the file being checked. The date must be specified in the job date format.

ENDOPT Endopt

Controls whether the tape is rewound only or rewound and unloaded after the operation ends.

Type
*CHAR
Required
No
Default
*LEAVE
Length
7
Case
Uppercase

Allowed values: *REWIND, *LEAVE, *UNLOAD

*LEAVE
The tape is not rewound. The next file operation starts at the beginning of the data file where the tape is currently positioned.
*REWIND
The tape is rewound, but not unloaded.
*UNLOAD
The tape is automatically rewound and unloaded after the operation ends.

Examples

CHKTAP DEV(TAPE1) VOL(TAPEVOL)

Checks the volume identifier of the volume on the tape device TAPE1. If the volume identifier on the tape is TAPEVOL, the command completes normally and no message is sent.

CHKTAP DEV(TAPE2) VOL(VOLID) SEQNBR(5) LABEL(FILE5) CRTDATE('1/9/84')

Checks the volume on the tape device TAPE2 for a volume identifier of VOLID. If that volume is found, sequence number 5 is located on the tape (it must be a standard-labeled tape).

IBM command documentation

Generated from os/cl/catalog/CHKTAP.json and os/cl/help/CHKTAP.json.