This statement can only be embedded in an application program, except in REXX programs. It is an executable statement that cannot be dynamically prepared.
None required.
RELEASE {location-name | host-variable | CURRENT | ALL [SQL] | ALL PRIVATE}
Identifies an SQL connection or a DB2 private connection by the specified location name or the location name contained in the host variable. If a host variable is specified:
The specified location name or the location name contained in the host variable must identify an existing SQL connection or DB2 private connection of the application process.
If the RELEASE statement is successful, the identified connection is placed in the release pending status and will therefore be ended during the next commit operation. If the RELEASE statement is unsuccessful, the connection state of the application process and the states of its connections are unchanged.
Identifies the current SQL connection of the application process. The application process must be in the connected state.
If the RELEASE statement is successful, the identified connection is placed in the release pending state and will therefore be ended during the next commit operation. If the RELEASE statement is unsuccessful, the connection state of the application process and the states of its connections are unchanged.
Identifies all existing connections (including local, SQL, and DB2 private connections) of the application process and places these connections in the release pending status. These connections are ended during the next commit operation. An error or warning does not occur if no connections exist when the statement is executed.
Identifies all existing DB2 private connections of the application process and places these connections in the release pending status. These DB2 private connections are ended during the next commit operation. An error or warning does not occur if no DB2 private connections exist when the statement is executed.
The SQL connection to TOROLAB1 is not needed in the next unit of work. The following statement causes it to be ended during the next commit operation:
EXEC SQL RELEASE TOROLAB1
Description