The prvkey statement operates in the same manner as the nxtkey statement with the exception that the keys returned are those previous to the beginning key value key.
PRVKEY 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. |
The keys are returned in what might be viewed as reverse order, and a short list is due to a beginning file condition.