![HP Q153090901 Technical Reference Manual Download Page 38](http://html.mh-extra.com/html/hp/q153090901/q153090901_technical-reference-manual_165572038.webp)
Commands
38
ERASE
19h
The
ERASE
command is used to erase data on tape from the current logical position. The Long bit
is used to decide whether the ‘old’ data is physically overwritten or not. E
RASE
commands (short or
long) to a drive containing a WORM cartridge will not overwrite or erase user data on tape.
Pre-execution checks:
Command descriptor block:
CDB fields:
NOTE:
Short erase is only used to truncate data at the current logical position. It cannot be
used to create a “hole” in the tape into which data can subsequently be written “in place”. This
will merely cause the drive to streamfail. The logical tape position is unaffected by this
command. A
CHECK CONDITION
for Early Warning EOM (drive error code 2C98h) will only be
given if the tape is logically positioned past EOT immediately before the erase.
Erase Specific status:
Illegal Field
Reservation
Deferred Error
Unit Attention
Media Access
Media Write
Diagnostic Status
7
6
5
4
3
2
1
0
0
Operation Code (19h)
1
Reserved (0)
Immed
Long
2–4
Reserved (0)
5
Control
Immed
0 The drive reports status after the command has completed.
1 The drive reports status when it starts the command (after any pre-execution checks and
prerequisite unloads have completed).
Long
The Long bit controls the distance to be erased.
0 The current position becomes the end of logical data.
1 End of Data is written, followed by Data Set Separators to the end of the tape.
Event
Status
Key
Additional Sense
The erase fails
CHECK CONDITION HARDWARE ERROR 5100h (erase failure)
WORM media:
Erase would
result in user data being over-
written.
CHECK CONDITION DATA PROTECT
300Ch (WORM medium
—overwrite attempted)