Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!netsys!macomh!macom1!larry From: larry@macom1.UUCP (Larry Taborek) Newsgroups: comp.unix.wizards Subject: Re: reading an "IBM tape" on UNIX Message-ID: <4847@macom1.UUCP> Date: 4 May 89 16:51:00 GMT References: <23398@shemp.CS.UCLA.EDU> Organization: CENTEL Federal Systems, Reston, VA. 22091-1506 Lines: 45 From article <23398@shemp.CS.UCLA.EDU>, by tamir@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@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 703-758-7000