underthew00d
Programmer
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
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