FETCH [ ABSOLUTE offset | RELATIVE offset ]
... cursor [ INTO hostvariablelist ]
offset: number
cursor-name: identifier, or host variable
hostvariablelist: list of host variables
To retrieve a row from a cursor.
DECLARE, PREPARE, OPEN.
This command repositions a cursor and optionally puts the data from the new row into host variables (see "Host variables with WSQL HLI"). If a host variable list is not used, then the data from the new row can be obtained using the wsqlgetfield function.
The named cursor must be open.
The ABSOLUTE clause places the cursor on row number offset. The RELATIVE clause places the cursor offset rows forward or backward (if negative) in the result set. If both clauses are omitted, then the default behavior is to move the cursor forward one row.
This command is functionally similar to the Embedded SQL command FETCH. See "FETCH statement".