The cursor that the cursor name specifies must be open.
This statement is allowed only inside of a stored procedure, user-defined functions, or a trigger. Cursors and variables are only allowed inside of stored procedures, user-defined functions, and triggers.
Examples
The following example closes the cursor BTUCursor.
CLOSE BTUCursor;
============
CREATE PROCEDURE MyProc(OUT :CourseName CHAR(7)) AS