Tapes and close to a quarter-century.

bmcculley at rcn.com bmcculley at rcn.com
Fri Sep 15 17:11:02 EDT 2006


---- Original message ----
>From: Jon maddog Hall <maddog at li.org>  
>greenmt at gmail.com said:
>> Suppose a EBCDIC file on a tape from IBM mainframe is read onto a Linux
>> server, and this EBCDIC file on the tape has 100 records with a length  of
>> 13054, is it correct to estimate the size of the file on Linux server  would
>> be 1,305,400 bytes?
>
>Generally speaking, yes.  Tapes can be both variable length records and variable
>length blocks, but often were fixed-length records and fixed-length blocks.  If
>fixed-length blocks then data size is usually a simple multiplication.

Usually but not always.  It's simple for fixed length records in fixed length blocks, more complicated for variable length records in fixed length blocks.  Depending on the software that wrote the tape the records might or might not be allowed to span block boundaries.  The stated situation sounds like fixed length records, but fixed length records could be containing variable length data fields, just to add another possible level of complication.  Just something to be aware of.

>> Is block size information also needed to  calculate the size?
>
>A "block" on a magnetic tape is the size of the data between "inter-record gaps".
>On a start-stop tape drive this "gap" allowed the tape drive to come to a stop, then
>gather speed to read again.  There was no useful data in the gap.  Usually the block
>size was an even multiple of the record size, particularly on fixed length record
>tapes.
>
>Typically the larger the blocks, the more likely the block was to have a read error
>(particularly in the early days of tapes) and therefore block sizes tended to be
>low multiples of record size.  Block sizes tended to increase as tape drive mechanisms
>and techniques improved.  After a while "streaming tape" (tapes with no real
>start-stop gaps) took over.

Streaming tapes did have inter-record gaps, possibly longer than those on start-stop drives.  This is because a streaming tape kept the tape in motion as the data stream was being written, and did not stop immediately after the end of a write.  If the next block was supplied in time the tape kept moving and the data was written following a gap of some indeterminate length.  If more data was not supplied in time, a horrendously expensive stop-reposition-start sequence was initiated.  Thus the time-out interval was usually not very tight, and gaps were loose.

-Bruce McCulley
(ex-RSX11 devo)

>Just because you had a "record" of 13054, does not mean that each record had
>13054 useful bytes of data in each one, it depended on what the program put into it.
>
>On the other hand, your record length is sort of an odd record length, so it may be a
>real "record" of information.
>
>Usually you can use the 'dd' command to easily read an ibm EBCDIC tape and convert it
>to ASCII.  Remember that most Unix systems (heck, most systems in general)
>use "ASCII", not "EBCDIC", so you might want to convert it, assuming that it is
>character data on the tape.  But if it is not character data, just "binary" data,
>then converting it would be a mistake.
>
>Here is a rough example of what you will need:
>
>dd if=/dev/<tape_drive> of=<file_name> conv=ascii,ibs=13054
>
>The "ibs" in the command line stands for "input block size", and you might try it
>both as 13054 and the actual block size of the tape, as I do not remember which
>number it relates to.  Sorry, but it has been 23 years since I last had to do this.
>
>Regards,
>
>maddog
>-- 
>Jon "maddog" Hall
>Executive Director           Linux International(R)
>email: maddog at li.org         80 Amherst St. 
>Voice: +1.603.672.4557       Amherst, N.H. 03031-3032 U.S.A.
>WWW: http://www.li.org
>
>Board Member: Uniforum Association
>Board Member Emeritus: USENIX Association (2000-2006)
>
>(R)Linux is a registered trademark of Linus Torvalds in several countries.
>(R)Linux International is a registered trademark in the USA used pursuant
>   to a license from Linux Mark Institute, authorized licensor of Linus
>   Torvalds, owner of the Linux trademark on a worldwide basis
>(R)UNIX is a registered trademark of The Open Group in the USA and other
>   countries.
>
>_______________________________________________
>gnhlug-discuss mailing list
>gnhlug-discuss at mail.gnhlug.org
>http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



More information about the gnhlug-discuss mailing list