Re: tape i/o
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Tue, 29 Nov 2005 11:04:39 -0800
rtre <tremmel@xxxxxxx> wrote:
> I would be glad if someone could help me with a simple example how to read
> data from tape.
It is highly system dependent. There was a time when "normal" opens
worked fine for tapes; in fact there was a time when essentially all
files were tapes and early disk files were referred to as though they
were pseudo-tapes.
But unix systems don't deal with tapes the same way as the older systems
did. (And Windows systems even less so). Unix isn't really very "tape
friendly". From the form of the pathnames in your example, it appears
that you are on a Unix system. You have a few choices.
1. Some unix systems might have special system-dependent routines for
reading tapes. That's probably the topen stuff you were referring to;
sounds vaguely familliar. It always was a bit of a hack and system
dependent. I can't help much with finding those if they aren't on your
system.
2. You could no doubt grub around at a really low level with operating
system calls. Not for the faint of heart. If you have to ask, then you
aren't up to it. :-) (And besides, I wouldn't know the details anyway.)
3. You *might*, I repeat *might* be able to read the tape using direct
access. This avoids the problem that the tape probably doesn't have
records structured in the way that current Fortrans expect sequential
records on disk to look like. You might also trash the tape and.or the
tape drive in experimenting though. If you do, I disclaim
responsability. :-(
4. Probably the best choice. Copy the tape to disk. The unix dd command
should be able to do that. "Man dd". Yes, I'm sorry that dd has a mess
of options and I can't tell a'priori which ones are relevant to your
tapes. Odds are that you don't need a very complicated dd command. Then
you can read the disk file. You'll probably need to use direct access
because of the lack of expected record structure for sequential, but
with a disk file I'm confident that the direct access will work.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- References:
- tape i/o
- From: rtre
- tape i/o
- Prev by Date: Re: printing logical variables as "true" and "false"
- Next by Date: Re: Good book on fortran 90/95
- Previous by thread: Re: tape i/o
- Next by thread: Re: tape i/o
- Index(es):
Relevant Pages
|
|