home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.idl-pvwave
- Path: sparky!uunet!wupost!crcnis1.unl.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!ljg
- From: ljg@space.physics.uiowa.edu (Larry Granroth)
- Subject: reading multiple tape files
- Message-ID: <BzqxwA.2Ao@space.physics.uiowa.edu>
- Organization: The University of Iowa, Department of Physics and Astronomy
- X-Newsreader: TIN [version 1.1 PL8]
- Date: Thu, 24 Dec 1992 04:31:18 GMT
- Lines: 36
-
-
- Can anyone suggest a good way of reading multiple files from a tape
- device in (Unix) IDL? EOF() doesn't work with a tape file. I can
- do something like:
-
- openr,1,'/dev/nrst0'
-
- while more_files_on_tape do begin
-
- !error=0
- on_ioerror, done
-
- while (1) do begin
- readu,1,buf
- ; . . . process data ...
- endwhile
-
- done:
-
- if !error then print, !err_string
- !error = 0
- on_ioerror, null
-
- endwhile
-
- This will work to read a single file at a time, but the on_ioerror
- immediately jumps to "done" on any attempt to read more than one file.
- Also, I'm not really sure how to test for "more_files_on_tape", except
- maybe checking for a "zero-length" file which might be a result
- of two consecutive tape marks.
-
- Thanks for any info.
-
- Happy Holidays.
-
- larry-granroth@uiowa.edu
-