R-START-FUNCTION (op-code 7)

This routine positions the file pointer for the next R-NEXT-FUNCTION or R-PREVIOUS-FUNCTION. The R-START-FUNCTION routine has three parameters: file_handle, keyval, and mode.

The F_EQUALS mode is usually used to test for the existence of a record or to position a file when the key value is known. The F_NOT_LESS and F_GREATER modes are used to position the file for a series of NEXT calls and the F_LESS and F_NOT_GREATER modes are used to prepare for a series of PREVIOUS calls.

After a successful START, the current key of reference is set to keyval. The next READ, NEXT or PREVIOUS call returns the record selected by the START routine. Note that in this case, READ, NEXT and PREVIOUS will all return the same record.

If the START routine fails, the current key of reference is placed in the undefined state.

Some file systems cannot perform the F_LESS or F_NOT_GREATER modes. On these file systems, specifying these modes causes START to return an error and set the E_NO_SUPPORT condition.