reading an \"IBM tape\" on UNIX

Neil Rickert niuvax!niucs1!rickert at antares.mcs.anl.gov
Wed May 3 02:53:14 AEST 1989


<From: tamir at oahu.cs.ucla.edu
	
<I have received a tape that was written on an IBM mainframe
<running some standard IBM OS (MVS/CMS ?).
<Below are the IBM scripts used to read the tape
<and to generate the tape.  ...

<If anybody can identify the "type" of the tape, please
<let me know.
< ...
<"FILEDEF " ddone " TAP1 (LRECL 3 BLOCK 3519 RECFM FB"
< 
<do i = 1 to 7
<   fno = fn || i
<   "FILEDEF " ddtwo " DISK" fno ft fm "(LRECL 3 BLOCK 3519 RECFM FB"
<   "MOVEFILE INDD OUTDD"
<end
< 
<"TAPE REW"

The first script listed "EXEC file for reading the tape" has absolutely
nothing to do with the tape.  The second is mostly conversational with the
user, with only a few relevant lines which read or write the tape.

Most likely the tape is an unlabelled tape.  It apparently contains 7 files.
Each file contains 3 byte records, written to tape in blocks of 3519 bytes
(or 1173 records).  There is an outside chance that the tape has IBM labels
in which case the data is in files 2,5,8,..., with the other files containing
80 byte header/trailer labels (in EBCDIC).

If the actual data on the tape is character data, it is undoubtedly EBCDIC.  If
it is binary data, you ought to know something about its nature to even want
to read it.

I would suggest trying "dd if=TAPEDEVICE of=OUTPUTFILE ibs=3519"
where of course the TAPEDEVICE and OUTPUTFILE are replaced by the appropriate
names.  If you need to convert from EBCDIC you can do that later.  Don't use
any conversion options on the "dd" command, unless you are sure that the tape
contains character data.  You can always rerun "dd" on the disk file later.
   Neil Rickert, Northern Illinois University.



More information about the Comp.unix.wizards mailing list