Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Check Tape (CHKTAP) command searches a volume on the specified device for a unique volume identifier or file label. If the correct tape is loaded, you may process this file on the next tape operation by specifying the same sequence number that was specified in the Check Tape (CHKTAP command). If the correct tape is not found, an escape message is sent.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DEV | Device | Name | Required, Positional 1 |
VOL | Volume identifier | Character value, *MOUNTED | Optional, Positional 2 |
SEQNBR | Sequence number | Integer, *NONE, *FIRST, *NEXT, *SEARCH | Optional, Positional 3 |
LABEL | File label | Character value, *NONE | Optional, Positional 4 |
CRTDATE | Creation date | Date, *NONE | Optional |
ENDOPT | End of tape option | *LEAVE, *REWIND, *UNLOAD | Optional |
Top |
Specifies the device in which the volume being checked is placed.
This is a required parameter.
This is a required parameter.
Top |
Specifies 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.
Top |
Specifies whether a check is made for a specific sequence number of a data file on the tape.
Top |
Specifies whether a label identifier is checked. If a label is specified, a sequence number must be specified for the Sequence number (SEQNBR) parameter.
Top |
Specifies 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.
Top |
Specifies whether the tape is rewound only or rewound and unloaded after the operation ends.
Top |
Example 1: Checking the Volume Identifier
CHKTAP DEV(TAPE1) VOL(TAPEVOL)
This command 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. If the volume identifier on the tape is not TAPEVOL, an escape message is sent.
Example 2: Checking for a Specific Sequence Number
CHKTAP DEV(TAPE2) VOL(VOLID) SEQNBR(5) LABEL(FILE5) CRTDATE('1/9/84')
This command 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). The sequence number in the file label is used to position to sequence number 5. If the sequence number is found and the header label contains both the file identifier FILE5 and the date of 1/9/84, the correct tape and file has been found, and a completion message is sent. The next tape operation can specify sequence number 5 to access this file without positioning the tape. If the specified volume is not found or the tape is not a standard labeled volume, an escape message is sent. If the volume is found and the sequence number is not found, an escape message is sent. If the file label at that sequence number is not FILE5, an escape message is sent. If the date at that sequence number is not 1/9/84, an escape message is sent.
Top |
*ESCAPE Messages
Top |