CL Command Reference - CHKTAP

CL Command List > CHKTAP Reference

Description:

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.



Examples:

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.