One reason an MFS may wish to trap the READNEXT call is in order to fulfill READNEXT calls without recourse to the BFS. In OpenInsight, both QUICKDEX.MFS and SI.MFS trap the READNEXT call, returning record keys without passing the call to the BFS.

QUICKDEX.MFS provides a good model for using an MFS to trap READNEXT requests. If the filing system SELECT call has returned a select mode of 1 (latent file select), QUICKDEX.MFS traps the READNEXT call. The MFS reads the %RECORDS% record from the current file, and returns it as the next block of keys. If another READNEXT call comes down to the MFS, QUICKDEX.MFS simply returns a false, since all keys were returned in the first call.

  • No labels