Closing a Cursor

When your application has finished using the cursor, it should be closed using the CLOSE statement. For example:

     EXEC SQL
         CLOSE Cur1
     END-EXEC

Normally, when a cursor is closed, all locks on data and tables are released. If the cursor is closed within a transaction, however, the locks may not be released.