Hello,
How do I create a new line in a direct access file?
I have this code right below. Instead of writing the records all on the same line I'd like to write each record in a different line.
PROGRAM TEST
OPEN (UNIT=10, FILE='TEST.TXT', FORM='FORMATTED', ACCESS='DIRECT',
+STATUS='OLD', RECL=1)
DO N=0, 9, 1
WRITE (10,1, REC=N+1) N
END DO
CLOSE(10)
1 FORMAT (/,I1)
END
Thanks!
How do I create a new line in a direct access file?
I have this code right below. Instead of writing the records all on the same line I'd like to write each record in a different line.
PROGRAM TEST
OPEN (UNIT=10, FILE='TEST.TXT', FORM='FORMATTED', ACCESS='DIRECT',
+STATUS='OLD', RECL=1)
DO N=0, 9, 1
WRITE (10,1, REC=N+1) N
END DO
CLOSE(10)
1 FORMAT (/,I1)
END
Thanks!