SCROLL CURSOR WITH HOLD
Like many programs that perform database maintenance, the Query program uses a
SCROLL CURSOR
to move through an SQL result set, updating or deleting
the rows as needed. BDL cursors are automatically closed by the database interface when a
COMMIT WORK
or ROLLBACK WORK
statement is performed.
To allow the user to continue to scroll through the result set, the SCROLL
CURSOR
can be declared WITH HOLD
, keeping it open across
multiple transactions.