Closing a rowset cursor

Close a rowset cursor when it finishes processing rows if you want to free the resources or if you want to use the cursor again. Otherwise, you can let DB2® automatically close the cursor when the current transaction terminates or when your program terminates.

About this task

To free the resources held by the cursor, close the cursor explicitly by issuing the CLOSE statement.

If you want to use the rowset cursor again, reopen it.

Procedure

To close a rowset cursor:

Issue a CLOSE statement.