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.
must be a valid file handle returned by R-OPEN-FUNCTION.
is the record position at which to start. It is a long value.
is a direction. Valid values are as defined in filesys.def. They include:
F-EQUALS (0) | start at the specified key |
F-NOT-LESS (1) | start at the specified key, or the one after |
F-GREATER (2) | start at the record beyond the specified key |
F-LESS (3) | start at the record before the specified key |
F-NOT-GREATER (4) | start at the specified key, or the one before |
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.