FetchNext()

 variable.FetchNext()

This method is used to fetch the rows consequently from the active set. It can be used with both cursors declared WITH SCROLL and with the sequential cursors. This method moves the cursor to the next row in the active set and retrieves it. It does not accept any arguments.

CALL cur_v.FetchNext()

You can also use this method to verify whether there are no rows left to fetch, because this method returns sqlca.sqlcode which is 0, if there are still rows to fetch and 100, if the NOT FOUND condition occurs, e.g.:

WHILE (cur_v.FetchNext()=0)