Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!ibd!heilpern From: heilpern@ibd.BRL.MIL (Mark A. Heilpern ) Newsgroups: comp.unix.wizards Subject: Re: reading an "IBM tape" on UNIX Message-ID: <260@ibd.BRL.MIL> Date: 5 May 89 14:53:55 GMT References: <23398@shemp.CS.UCLA.EDU> <4847@macom1.UUCP> Reply-To: heilpern@brl.arpa (Mark A. Heilpern (IBD) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 38 In article <4847@macom1.UUCP> larry@macom1.UUCP (Larry Taborek) writes: >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 > > >> if there is a way to read this tape on UNIX. > > >> /* DEFINE TFB-512 AS 199 (BLK 60000 */ >> /* FORMAT 199 F (B 4096 */ > >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 [lots deleted] An easier method, if you are unfamiliar with the use of dd, is to use the public domain program 'ansir', ansi-read. I believe source for this exists on uunet.uu.net. It can read files in a variety of different formats, including both ascii, ebcdic, and binary, in the format of quite a few machines. One bug in it I've found however: While trying to read files in DEC format (from the rsx-11 operating system), 'ansir' was unable to retrieve the file-name information. I later found out 'ansir' had placed 14 extra bytes at the head of each file-- the name, user/group codes, etc, in a compressed manner. It was rather difficult writing the (basically simple) program to decode the name from this. The difficulty was in a lack of information. --M.