The nxtkey statement scans forward through a key file along a key path.
NXTKEY result FROM filevar,a.code,key,n THEN/ELSE
result | Returned variable containing the keys retrieved in a multi-attribute dynamic array. | |
filevar | Variable to which the data file has been opened. | |
a.code | String expression containing the a (algebraic)
processing code located in the file-defining item that identifies the index to use. The index must have previously been created with create-index. |
|
key | Beginning key value at which to begin the retrieval. | |
n | Number of keys to retrieve. |
This statement retrieves at most n keys. Fewer may be retrieved if end-of-file is reached.
Repetitive use of this statement is allowed with the last key from the previous statement being supplied as the beginning key for the next statement.
0 | The file was not a keyed file. |
1 | The a.code variable was invalid. |