I am trying to read a Sequential file from a disk with one big physical record. Using INQUIRE I know it is a sequential file with a recl of 2147483647. The disk file is uploaded to an old mainframe system that apparently 'thinks' it is a tape file.
The record contains formatted 'employee-related' data consisting of 250 characters for approximately 550 employees, so 550*250 vs the recl number tells me there is lots of blank (or garbage) data at the end of the record.
I need to read the record as character*250 data(550), do some fixes in the data, and then write out the corrected version in the same 'tape-like' format to send to the mainframe.
I have tried:
100 format(a250)
read(*,fmt=100)(data(i),i=1,1)
which works EXCEPT that it does NOT read the first character of the first chunk of data, but starts at the second character....how can I get the 1st character of the 250 character sequence?
but
100 format(a250)
read(*,fmt=100)(data(i),i=1,550)
(or even reading just i=1,2) generates the following error:
"An endfile error was detected in a READ statement"
Apparently there is an endfile marker between each data chunk, eventhough the RECL is huge. I don't understand it.
If an implicit read will not work, is there something else I can try?
Thanks!
The record contains formatted 'employee-related' data consisting of 250 characters for approximately 550 employees, so 550*250 vs the recl number tells me there is lots of blank (or garbage) data at the end of the record.
I need to read the record as character*250 data(550), do some fixes in the data, and then write out the corrected version in the same 'tape-like' format to send to the mainframe.
I have tried:
100 format(a250)
read(*,fmt=100)(data(i),i=1,1)
which works EXCEPT that it does NOT read the first character of the first chunk of data, but starts at the second character....how can I get the 1st character of the 250 character sequence?
but
100 format(a250)
read(*,fmt=100)(data(i),i=1,550)
(or even reading just i=1,2) generates the following error:
"An endfile error was detected in a READ statement"
Apparently there is an endfile marker between each data chunk, eventhough the RECL is huge. I don't understand it.
If an implicit read will not work, is there something else I can try?
Thanks!