Write specific status:

See also the “Additional Sense codes” on page 159 for a variety of possible hard errors.

An attempt to write to a write-protected cartridge will produce a CHECK CONDITION with a sense key of DATA PROTECT and additional sense of 2700h (write-protected).

An attempt to write to a cartridge whose Cartridge Memory has failed will produce a CHECK CONDITION with a sense key of MEDIUM ERROR and additional sense of 3004h (cannot write medium). If, however, the tape is not positioned at BOT, the drive will respond with sense data as if the tape is write-protected. The WP flag in the Mode Parameter Header will also be set.

If EOM (end of medium) is encountered during a write, CHECK CONDITION status is reported. The EOM flag will be set. The sense key will be set to VOLUME OVERFLOW with additional sense of 0002h (EOT). Residue information will be as below. The logical position will be EOD.

Subsequent Request Sense commands will, however, give tape position as EOP/M. It may still be possible to write a smaller quantity of information (such as filemarks or a smaller block). This is because logical position after failure to write a block returns to the start of the unwritten block.

Early Warning EOM information is reported only if a write operation is successful. This is done by reporting CHECK CONDITION status with a sense key of NO SENSE and additional sense of 0002h (EOT). Residue information is valid and indicates zero blocks/bytes.

Residue information:

Residue information depends on two variables:

Fixed or Variable block mode.

Immediate or Non-Immediate Report (Buffered mode).

Block Mode

Buffered Mode

Residue

Variable

0

Number of unwritten bytes

 

 

 

Fixed

0

Number of unwritten blocks

 

 

 

Variable

not 0

Total number of unwritten bytes and marks (including those buffered

 

 

before the command was received). The size can be greater than the

 

 

command operation size.

 

specifically 1

Contains residues of all initiators with data in the buffer.

 

 

 

Fixed

not 0

Total number of unwritten blocks and marks (including those buffered

 

 

before the command was received). The size can be greater than the

 

 

command operation size.

 

specifically 1

Contains residues of all initiators with data in the buffer.

 

 

 

Residue information is set in the sense data byte, with the Valid bit set and the information bytes set to the residue.

Commands

WRITE 0Ah 179