This command serves like the command Search (S) the search for a data record over the indicated key value, but no full information of the key is necessary here.
FATS looks up for the first key, which begins with the characters specified over "KeyString".With the commands Search Next (N) and Search Next After (A) you can determine the following data records, but you have to compare the value of "KeyString" with the returned key value each time.
If FATS finds the requested key, it returns the key value in the FATSKEY variable and a errorcode of 0. Otherwise, it returns a nonzero status in the ERRORCODE variable indicating why it cannot find the key:
12 | There is no key which starts with the characters specified over "KeyString",FATS returns the record number of the adjacent smaller key |
13 | The specified key was not found because it is smaller than all keys in the index file. FATS returns the first key in the file. |
15 | The specified key was not found because it is greater than all keys in the index file. FATS returns the last key in the file. |
16 | There wasn’t inserted any keys into the index file. |