- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have programs written for unix that I am porting to the PC. I have routines for writting and reading unformatted direct access files. I open the files with
open (10,file='file10',access='direct',form='unformatted',recl=lrecl ,status='unknown')
where lrecl =4*512
then when i compile i use:
/align:norecords /align:nocommons /align:nodcommons
When i read the data I get the correct data up to value 511. (maybe 512)
There seems likes lots of combinations of compile and open options(like buffered)
Does any one have any ideas about this problem?
open (10,file='file10',access='direct',form='unformatted',recl=lrecl ,status='unknown')
where lrecl =4*512
then when i compile i use:
/align:norecords /align:nocommons /align:nodcommons
When i read the data I get the correct data up to value 511. (maybe 512)
There seems likes lots of combinations of compile and open options(like buffered)
Does any one have any ideas about this problem?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try changing the 4*512 to just 512. In Compaq Fortran, the default RECL unit for unformatted files is 4-byte longwords, not bytes. You can change this with /assume:byterecl Should be all you need.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve:)
/assume:byterecl was all I needed
/assume:byterecl was all I needed

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page