reading multiple tape files [message #624] |
Wed, 23 December 1992 20:31 |
ljg
Messages: 5 Registered: January 1993
|
Junior Member |
|
|
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
|
|
|