ROLLBACK performs the following additional actions when used within an embedded SQL application:
- Discards dynamic SQL statements prepared within the current transaction.
- Closes open cursors.
- Cancels database changes made by the current transaction.
- Sets SQLCODE to zero when ROLLBACK is successful.
- Sets the first SQLERRD element of the SQLCA to 3513 or 3514, depending on whether abort_message is specified.
- Returns an abort message in the SQLERRM field of the SQLCA if you specify a WHERE clause.
- Terminates the application program connection (whether explicit or implicit) to the database if the RELEASE keyword is specified.
Environment | Preprocessor Action When a LOGON/CONNECT Request Does Not Precede the Next SQL Request |
---|---|
Mainframe-attached | Attempts to establish an implicit connection. |
Workstation-attached | Issues a No Session Established error. |