- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have received some data files that have been difficult to read. It turns out that the data in the file are little endian, but the Fortran record indicators are big_endian. I can't go back to the source and figure out what they were doing. I am pretty sure the files were generated on an IBM Power system under AIX (but I am not positive).
Is there a way to tell the compiler to read the record indicators as one endian type, but the data as another?
Thanks,
Craig
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, sorry. I'd be very curious to know the details of how such a file was constructed - I haven't run into such a combination before.
The best I can suggest is to write some routines to do the byte swapping after you read the data.
The best I can suggest is to write some routines to do the byte swapping after you read the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It came from an IBM Power system. I think that the data were generated by a C routine that mimicked creation of an unformatted fortran file. I found someone who wrote a code to do the conversion for this data.

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