With this COBOL system, the Current Record Pointer (CRP) is only affected when START, READ (sequential or random) and OPEN operations are performed on the file.
With the Btrieve run-time system, however, the CRP is affected by WRITE, REWRITE and DELETE operations. This means that, following these operations, the CRP in a Btrieve file has to be restored to its original position so that sequential READ statements are not affected.
In a shared environment, the re-positioning of the CRP can fail if the record to be re-positioned on has been deleted by another user. If this happens, any attempt to perform a sequential READ returns an error.
In the following sections, re-positioning of the CRP is performed after the operation has completed and not at the time of the next sequential READ statement. This reduces the possibility of the record being deleted and increases the possibility of successfully re-positioning the CRP.