A write/read control method for recording at least one datum on a magnetic
tape within a predetermined distance is provided. The method includes
sequentially accumulating a plurality of blocks of data of variable
length in a buffer divided into fixed length segments and writing the
contents of each segment to the tape. If the segment contains at least
one block of data, the data is written to the tape as a dataset and if
the segment does not contain any data, then a null dataset is written to
the tape within the predetermined distance. The predetermined distance
may vary depending upon the format of a tape drive embodying the method.
In response to a request to read a block of data, reading at least one
dataset that includes the requested block of data from the tape to
segments in the buffer, and reading the requested block of data for
invalidating data transfer of a null dataset in the segment. By
invalidating the transfer of a null dataset, blocks of data separated by
the null dataset can be reconstructed.