CLOSE
Valid in: ESQL, OpenAPI, ODBC, JDBC, .NET
The CLOSE statement closes an open cursor.
The CLOSE statement has the following format:
EXEC SQL CLOSE cursor_name
cursor_name
Specifies the cursor name using a quoted or unquoted string literal or a host language string variable. If cursor_name is a reserved word, it must be specified in quotes.
The cursor_name must have been previously defined in your source file by a DECLARE CURSOR statement. Once closed, the cursor cannot be used for further processing unless reopened with a second OPEN statement. A COMMIT, ROLLBACK, or DISCONNECT statement closes all open cursors.
A string constant or host language variable can be used to specify the cursor name.
Last modified date: 04/03/2024