- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I know the record length (recl) and number of record(n) i want to read in a file is safe to:
open the file with a record length of recl*n
read the file in block
in other work can I always assume that the data will be sequential and not record delimiter will make this operation unsafe.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Was the file created with RECORDTYPE='FIXED'? If so, then yes you should be able to do this. Keep in mind that, by default, RECL is in units of 4-bytes. You might also want to look at the Fortran standard stream I/O feature that provides a POS= keyword to specify byte position in the file.
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