close considerations for SQL

In the context of SQL, the EGL close statement removes the result set that you created with an open or get...forUpdate statement.

EGL automatically removes the result set in these cases:

Syntax

For a syntax diagram see the core close statement.

Example

The following is an example of a SQL close statement:

close myCustomer;

Compatibility

Each relational database management system (RDBMS) has its own version of SQL. Not all SQL commands are available in every implementation. Before coding any embedded SQL, see the documentation for your RDBMS.

The following table describes compatibility considerations for the close statement and SQL.

Table 1. Compatibility considerations for close and SQL
Platform Issue
CICS® EGL closes all open result sets (even if the result set was opened with the hold option) when a converse statement runs in segmented mode.
IMS/VS EGL closes all open result sets (even if the result set was opened with the hold option) whenever a converse statement runs. (IMS/VS programs are always segmented.)
JSF handler EGL closes all open result sets (even if the result set was opened with the hold option) when the program presents a Web page.

Feedback