Closing a Collection Cursor

You can declare both Select and Insert cursors on collection variables. Such cursors are called Collection cursors. Use the CLOSE statement to deallocate resources that have been allocated for the Collection cursor. Only ESQL/C routines can use CLOSE to reference Insert cursors on collection variables. The CLOSE statement in SPL routines cannot reference direct Collection cursors that the FOREACH statement of SPL can declare.

For more information on how to use a Collection cursor, see Fetching from a Collection Cursor and Inserting into a Collection Cursor.