An "index cursor" is information that is used to maintain a position within an index.
It can be moved to the next (FIND NEXT, GET NEXT), the previous (FIND PREVIOUS; GET PREVIOUS), or a specific index entry, and it can be used to read the row at the current entry.
Index cursors are managed by the server on behalf of the clients. A cursor is opened, closed, repositioned, and used to fetch rows for a specific client at the request of the client.
As example, a FIND NEXT will move the index cursor to the next index key after a previous FIND FIRST/FIND NEXT.
FIND FIRST customer.
REPEAT:
UPDATE customer.
FIND NEXT customer NO-ERROR.
IF NOT AVAILABLE customer THEN LEAVE.
END.
After you use the FIND LAST statement to find the last record in a table, Progress positions the index cursor on that record. Any references within the same record scope to the next record fail.
FIND LAST customer.
RELEASE customer.
DISPLAY AVAILABLE customer.
REPEAT:
FIND NEXT customer.
DISPLAY name.
END.
In this example, the RELEASE statement releases the last customer record from the customer record buffer and the following DISPLAY statement displays FALSE because the customer record is no longer available. However, the index cursor is still positioned on that last record. Therefore, the FIND NEXT statement fails.
Multiple index cursors can be opened on one or more indexes at any time, as long as a separate buffer is used for each.