Data file and tape Input and Output
data_read(fd,event,eventSize)
data_read_alloc(fd,*event)
Purpose:
Arguments:
Return Value:
- DATAIO_OK --- success- a data record was read int the buffer
- DATAIO_EOF --- filemark or end of data. When reading from tapes on some systems
(notably IBM RS6000 AIX3 and AIX4), an end-of-data cannot be distinguished
from an infinite number of filemarks.
- DATAIO_EOT --- end of tape/end of data.
- DATAIO_ERROR --- read error. When reading tapes, possible causes for this return code might be
tape medium errors, tape drive failures and scsi bus resets.
- DATAIO_BADCRC --- when writing data records, the dataIO library always adds a control
checksum (CRC-32) to the data. When reading the data records, the library routines
recalculate this checksum and compare it with the value in the data. This enables
it to discover if the data becomes corrupted between the write and read operations.
How can the data get corrupted? The data on the tape and on the disk
is protected by various ECC (error-correction) schemes that can detect and
correct multi-bit errors enabling the tape and disk drives to transparently
perform error correction. However the data going over the SCSI bus is protected
only by parity checks, which can detect only single bit errors and in at least
one case we had a bad Exabyte EXB-8500 tape drive that was consistently
corrupting data. The data returned with the DATAIO_BADCRC error
should be discarded.
-
data_write(fd,event)
Purpose:
Arguments:
Return Value:
data_flush(fd)
Purpose:
Arguments:
Return Value:
data_writeFM(fd)
Purpose:
- write a filemark on the tape.
Arguments:
- fd --- file descriptor for the opened tape device
Return Value:
data_findFM(fd)
Purpose:
Arguments:
Return Value:
data_SeekTape(fd,runNo,*tapeNo)
Purpose:
Arguments:
Return Value:
Author: K.Olchanski, 1996-Apr-13