Xref: utzoo comp.periphs:3220 comp.unix.questions:26423 comp.unix.sysv386:1495 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!vtserf!wizards!valdis From: valdis@wizards.cc.vt.edu (Valdis Kletnieks) Newsgroups: comp.periphs,comp.unix.questions,comp.unix.sysv386 Subject: Re: Reading/writing IBM 9 track tapes under UNIX Message-ID: <505@vtserf.cc.vt.edu> Date: 23 Oct 90 20:55:27 GMT References: <1990Oct1.174354.22980@nimbus3.uucp> <1990Oct3.205556.16183@informix.com> Sender: news@vtserf.cc.vt.edu Reply-To: valdis@vttcf.cc.vt.edu (Valdis Kletnieks) Followup-To: comp.periphs Organization: Virginia Polytechnic Institute and State University Lines: 50 (Following up to an old article, but hopefully the corrections will help somebody who has to deal with standard-labeled tapes....) In article <1990Oct3.205556.16183@informix.com>, aland@informix.com (alan denney) writes: |> IBM standard labeled tape files look like this, file-wise: |> |> VOL1 (volume serial label) |> HDR1 (file header part 1) |> HDR2 (file header part 2) - very important - you see this as an End Of File |> |> EOF1 EOF2 |> HDR1 (file header part 1) |> HDR2 (file header part 2) |> |> EOF1 EOF2 |> ... |> EOV ? (end of tape marker) |> You probably need to use files=3 and conv=ascii as well. |> The record length, block size, and recording format (LRECL,BLKSIZE, |> RECFM) will appear on the HDR1 file, if you know how to parse it. Tapemarks are sensed and reported as 'end of file'. VOL1, HDR2, HDR2, EOF1, EOF2 are all 80-byte physical records. EOV1 is *only* present if the dataset runs off the end of the physical reel. End of *logical* reel is denoted by two consecutive tapemarks with no intervening data... Note that files=3 will leave you reading the EOF1 and EOF2 records.. The actual *data* is in files 2, 5, 8, 11,.... And be sure you remember the name your system uses for "no auto-rewind" on tape drives - you'll probably need it... (Nothing like trying to figure out why you keep reading files, and all you ever get is VOL1/HDR1/HDR2 :-) Valdis Kletnieks Computer Systems Engineer Virginia Tech