User's Guide

Commands: Locate (2Bh) Page 47
LOCATE (2Bh)
The LOCATE command is used to position the tape to the specified block address in
the specified partition. Before the locate operation is performed, all buffered data,
filemarks, and setmarks are transferred to tape. On completion, the logical position
is before the specified location.
LOCATE Command Descriptor Block
The following table shows the layout of the CDB.
Byte
Bits
7 6 5 4 3 2 1 0
0 0 0 1 0 1 0 1 1
1 0 0 0 0 0 BT CP IMMED
2 0 0 0 0 0 0 0 0
3 MSB—Block Address
4 Block Address
5 Block Address
6 Block Address—LSB
7 0 0 0 0 0 0 0 0
8 Partition
9 vendor unique* 0 0 0 0 Flag Link
* This vendor-unique field is reserved and must be set to zero.
Command Descriptor Block Field Description
The following table defines the fields in the CDB.
Field
Name
Bytes
Bits
Description
CP bit 1 1 If the Change Partition bit is 1, the drive changes to the partition whose
partition number is specified in the Partition field. If this bit is 0, the
Partition field is ignored.
IMMED
bit
1 0 If the IMMED bit is 1, status is returned as soon as the operation is
initiated. If the IMMED bit is 0, status is not returned until the tape is
positioned.
BT bit 1 2 If the Block Address Type bit is 1, the Block Address field is the total
number of logical blocks from the beginning of partition. All filemarks
and setmarks are ignored when searching the tape. If this bit is 0, the
Block Address field is the total number of logical blocks, filemarks, and
setmarks from the beginning of partition. Filemarks and setmarks are
counted when searching the tape.
Block
Address
3-6 These fields specify the logical block address of the block to which the
tape is to be positioned. Block 0 is the first block in a partition.
Partition 8 This field is valid only when the CP bit is 1. In that case, the field
specifies the partition to select—partition 0 (00h) or partition 1 (01h).
This selection should agree with the current tape format, either single-
partition or two-partition. Partition 1 is the first physical partition on a
dual-partition tape.