Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BACKSPACE and segmented records (ifort)

Status
Not open for further replies.

underthew00d

Programmer
Apr 13, 2015
1
GB
Hi guys,

I am having an issue with backspacing large segmented records.

Basically I have a code that reads very large records sequentially, but needs to step back to previous records various times during a run. I adapted the code to save the files in segmented file type as my records were getting too large to remain single variable length.

In order to step back over records the code used to rewind to the beginning and loop through doing READ to get to the necessary record, but this proved to be a bottleneck. So instead I have implemented a BACKSPACE functionality to get to the desired record more quickly. This works perfectly on records that are non-segmented, but doesn't work correctly for segmented records.

Is this a well-known fact that BACKSPACE is incompatible with segmented records or is there some kind of workaround? I wonder if the structure of segmented records means BACKSPACE needs to be handled differently?

Cheers,
Dan
 
Segmented records are IVF specific. I know of them but I have never used them because they are not portable. Why not just implement as direct-access fixed length records. Then you can use backspace or go directly to the record you wish to read again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top