M2488 PRODUCT GUIDE TAPE UNIT SCSI COMMANDS
April 1997 CG00000-011503 REV. A 4-141
a CHECK CONDITION and a sense key of Illegal Request. If the Fixed bit is zero, the WRITE
command operates in variable block mode regardless of the current mode set by MODE SELECT.
If the Fixed bit is set to zero, a single block is transferred from the initiator and is written to the
logical unit beginning at the current medium position. The transfer length specifies the length of
the block to be written (in bytes). Upon successful termination, the logical position is located after
the block written by this command (EOM side).
If the Fixed bit is set to one, the transfer length field specifies the number of block(s) to be trans-
ferred to the logical unit beginning at the current medium position. This form of the WRITE com-
mand is valid only if the logical unit is currently operating in fixed block mode (i.e., it has been
instructed to use fixed-length blocks by a MODE SELECT command). Upon termination, the log-
ical position is located after the block(s) written by this command (EOM side).
A successful WRITE command with the fixed bit of one, transfers the requested transfer length
times the current block length in bytes from the initiator. A successful WRITE command with the
fixed bit of zero, transfers the requested transfer length in bytes from the initiator.
If the transfer length specified by the WRITE command is 0, no data is transferred and the current
position on the logical unit is not changed. This condition is not considered an error.
Buffered Mode:
Write data may be buffered or unbuffered, as indicated by the Buffered Mode field of the MODE
SENSE command. For unbuffered operation, GOOD status is not returned until all data block(s)
are successfully written to the medium. For buffered operation, GOOD status is returned as soon
as all data block(s) are successfully transferred to the buffer.
If the early-warning condition is encountered while writing, an attempt to finish writing any buff-
ered data is made depending on the value of the SEW (Synchronize at Early Warning) bit in the
mode parameters (referenc e MODE SENSE/SELECT mode p age 10h). The command terminates
with a CHECK CONDITION status and the EOM and valid bits are set to one in the sense data. If
all of the data has been written to tape, the sense key is set to NO SENSE. If any data that is to be
written after encountering the early-warning condition cannot be written to tape due to physical
EOM being encountered, the sense key is set to VOLUME OVERFLOW.
Sense Data Information Bytes:
When the valid bit is set to one in the sense data generated when CHECK CONDITION status is
presented to the initiator for a WRITE command, then the information bytes in the sense data are
defined as follows:
1) If the target is in unbuffered mode (Buffered Mode of the MODE SENSE command is 0) and
the Fixed bit is one, the information bytes are set to the difference between the requested trans-
fer length and the actual number of blocks written to the medium.
2) If the target is in unbuffered mode (Buffered Mode of the MODE SENSE command is 0) and
the Fixed bit is zero, the information bytes are set to the requested transfer length.
3) If the target is in Buffered Mode (Buffered Mode of the MODE SENSE command is one or
two) and the Fixed bit is one, the information bytes are set to the total number of blocks and
filemarks not written (the number of blocks not transferred from the initiator plus the number
of blocks and filemarks remaining in the target’s buffer).
4) If the target is in Buffered Mode (Buffered Mode of the MODE SENSE command is one or
two) and the Fixed bit is zero, the information bytes are set to the total number of bytes and
filemarks not written (the number of bytes not transferred from the initiator plus the number of
bytes and filemarks remaining in the target’s buffer).