Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

sequential/direct acces file

Marcio_Pmz
Beginner
683 Views

Hello,

I have a file which is created for direct access,

open(1, file='file1.bin', access='direct',recl=lengthrec)

write(1,rec=nrec)[1.0,irec=1,lengthrec]

Eventually, I want to acces it as a sequential file. Is it possible?

 

Thanks!

Marcio.pmz

0 Kudos
1 Solution
Steven_L_Intel1
Employee
683 Views
You would have to close it and reopen it for sequential access. Add recordtype='fixed' and specify the same recl= value.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
684 Views
You would have to close it and reopen it for sequential access. Add recordtype='fixed' and specify the same recl= value.
0 Kudos
Marcio_Pmz
Beginner
683 Views
Dear Steve (Dr Fortran), So the key is recordtype='fixed'! Well, Thank you, very much!
0 Kudos
Reply