reading an "IBM tape" on UNIX

Larry Taborek larry at macom1.UUCP
Fri May 5 02:51:00 AEST 1989


>From article <23398 at shemp.CS.UCLA.EDU>, by tamir at oahu.cs.ucla.edu:
> I have received a tape that was written on an IBM mainframe

[later]

> if there is a way to read this tape on UNIX.

[other stuff]

> /*     DEFINE TFB-512 AS 199 (BLK 60000                           */
> /*     FORMAT 199 F (B 4096                                       */

[lots of other stuff]

I have read successfully Mag tapes created off an IBM mainframe.
I use the dd command to read them.  You will probably have to
play around with this some, varying the parameters but try 
something like this:

dd if=/dev/rmt0 of=stuff0 conv=swab cbs=512

where rmt0 is the device driver for the mag tape device that you
are reading from and stuff0 is the file you are going to put the
results into.  You may need to change the cbs block size, or even
specify ibs (input block size) and obs (output block size).
Also, as this is an IBM tape, it may be written in ebcdic, so a
conv=ascii,swab may be needed.  Some machines treat bytes
differently then others.  When done running the command, if the
file stuff0 has every set of characters reversed (like the word
"spelling" spelled "sepllnig" then the conv=swab needs to be put
in.  Also some tapes are created with a header file, to get at
the next file, use the skip command.  All of this information is
described more fully in the manual page on dd.  

PS  Make sure you know what bpi the mag tape was written at, as
you will have to have the same bpi when reading it.




-- 
Larry Taborek	..!uunet!grebyn!macom1!larry	Centel Federal Systems
		larry at macom1.UUCP		11400 Commerce Park Drive
						Reston, VA 22091-1506
						703-758-7000



More information about the Comp.unix.wizards mailing list