Patent ID: 7350021

Claim:
A method for according at least one datum on a magnetic tape in a predetermined distance in a longitudinal direction of the tape, the method comprising the following steps: sequentially storing a plurality of variable length data blocks in a buffer divided into fixed length segments, the data blocks transferred from a host and sequentially accumulated in the segments with ends of the data blocks compressed and used as end markers, the data blocks to be read are determined by locating the end markers of the data block in the segment, the data blocks stored in a segment of the buffer comprising a dataset; determining if the end markers of a data block are present in a segment and if the end markers of a data block are present in the segment, then writing the dataset to the tape, and writing a null dataset to the tape within the predetermined distance when a subsequent segment does not contain at least one data block while the tape is moving the predetermined distance; upon a null dataset being written to the tape, duplicating a dataset preceding the null dataset and writing the duplicate dataset to the tape so that datasets preceding the null dataset are continguous with datasets following the null datasets; and in response to a request of a data block to be read, reading datasets including the null dataset, the duplicated dataset, and the duplicate dataset from the tape to segments in the buffer, and invalidating the null dataset and selectively invalidating one of the duplicated dataset and the duplicate dataset in the reading datasets so that data blocks read are contiguous.