From: lvt-cfc@cyber2.servtech.com (christopher f. chiesa)
Subject: Re: reading a tape with several diff block sizes
Date: 1997/02/20 [thread overview]
Message-ID: <5ei6le$bko@cyber2.servtech.com> (raw)
In-Reply-To: 01bc1ecd$1c3510e0$702835cf@robinkaryn
In article <01bc1ecd$1c3510e0$702835cf@robinkaryn>,
Robin S Levine <rlevine@bellsouth.net> wrote:
>
>Need to read a tape that has several files on it, that are all blocked
>differently and have
>different blocksizes. Really have no desire to read it one char at a time
>(too long).
>
>Would like to know if there is a way to mount a tape multiple times with
>diff blocksizes
>without rewinding it or any other suggestions you may have ?
If I correctly understand what you want to do, there's no need to remount
it at all. I read tapes with variable blocksizes all the time, with just
one Mount. The one "gotcha" is this: you have to use MOUNT/FOREIGN, and
if the files are ANSI you have to process the ANSI formatting YOURSELF.
That being said, I would write a program that $ASSIGNed a channel to
the tape drive and used $QIOW to read the tape in a block-by-block
manner. Each $QIOW would request the "largest possible" blocksize --
65535 bytes as of VAX/VMS V5.4-3; has the limit perhaps been upped in
more recent VMS versions? -- and would look at the "byte transfer
count" field of the associated I/O Status Block upon completion of the
operation, to FIND OUT how many bytes, i.e. what size block, was
ACTUALLY OBTAINED. Jacket this in whatever
ANSI-format-interpretation logic you deem necessary, and VOILA -- no more
problem.
I've actually written a program like this, to recover ANSI-format files
from a tape whose first half had gotten overwritten by a BACKUP saveset;
that probably wasn't strictly necessary but I didn't know any better
methods at the time. I'd offer you the program, but it is highly
customized for the one particular tape I was working on, and moreover is
written in Macro-32 assembly which most people don't seem to know... If
none of this deters you, e-mail me for a copy.
All in all, if you're not comfortable with system-service programming
or the use of $QIOW in particular, this may be the "long way around the
tree" for you, and you may be better off just biting the bullet and doing
a DISMOUNT-and-reMOUNT sequence for each file... That may make it take
longer (possibly MUCH longer, particularly if you're using a tape medium
(e.g. 8mm Exabyte) that takes painfully long to do "repositioning") to
read the tape, but may be more within your capabilities if you're a non-
programmer. On the other hand, if you have many tapes to do, it might
be worth the effort to write a program, or have someone else write one
for you (e-mail me for info on THAT, too, if that's of interest ;-)).
Hope this helps. You're welcome in advance!
Chris Chiesa
lvt-cfc@servtech.com
next prev parent reply other threads:[~1997-02-20 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-20 5:00 reading a tape with several diff block sizes Robin S Levine
1997-02-20 5:00 ` christopher f. chiesa [this message]
1997-02-20 5:00 ` James Kirkpatrick
1997-02-20 5:00 ` Paul Edgington
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox