I'm in trouble while reading a CSV file with about 2 Gb:
OPEN(unit=11,status='OLD',file=fin,form='formatted')
IEND=0
n=0
DO
n=n+1
READ(11,*,IOSTAT=iEND1) RECORD
IF (IEND==0) THEN
deal with RECORD
ELSEIF (IEND>0) THEN
PRINT *, IEND
ELSE
STOP 'END OF FILE'
ENDIF
ENDDO
CLOSE(UNIT=11)
...
RECORD is an own defined type.
For some reason, everything goes fine up to reading record number 24200. There are about 21 million records in the file. I'm getting an IOSTAT=5010 message and RECORD comes back empty.
I carefully looked into the formatted file with vi -b file.csv and everything seems fine.
I'm using GNU Fortran (GCC) 5.2.0.
What does this IOSTAT coded really mean?