Specifications

ATAPI For Streaming Tape QIC-157 Rev B
97
6.8.15. WRITE Command
The WRITE command requests that the Device write the data that is transferred from the Host starting
at the current position.
Table 6-76 Write Command
Bit
Byte
7 6 5 4 3 2 1 0
0 Operation code (0Ah)
1 Reserved 1 (Fixed)
1 Reserved
2 (MSB)
3 Transfer Length
4 (LSB)
5 Reserved
6 Reserved
7 Reserved
8 Reserved
9 Reserved
10 Reserved
11 Reserved
The Transfer Length specifies the number of fixed-length blocks to be transferred using the current
block length reported in the mode parameter block descriptor.
If the Transfer Length is zero, no data shall be transferred and the current position shall not be
changed. This condition shall not be considered an error. For Devices that maintain a one-to one
relationship between physical and logical blocks and have stopped writing due to an unrecoverable
write error, the remainder of the buffer can be written less the block in error that is skipped and the
data is lost for that block.
If the Device encounters early-warning during a WRITE command, the command shall terminate
with “Check Condition” status and the EOM and Valid bits shall be set to one in the sense data. If all
data that is to be written is successfully transferred to the medium, the Sense Key shall be set to NO
SENSE or RECOVERED ERROR, as appropriate. If any data that is to be written cannot be
transferred to the medium when early-warning is encountered, the Sense Key shall be set to
VOLUME OVERFLOW.
In the case of an unrecovered write error, the Valid bit shall be set to one and the Information field shall
be set to the difference (residue) of the sum of the pending requested transfer lengths minus the actual
number of blocks and filemarks written. The value in the Information field may exceed the Transfer
Length for the last command. For formats able to restart a write operation, upon termination, the
logical position shall be after the unrecovered block.
Implementor's Note: The Device should ensure that some additional data can be written to the
medium (e.g., labels or filemarks) after writing all data stored in the buffers and the first early-
warning indication has been returned to the Host.