Previous Topic: Pseudoconversational ProgrammingNext Topic: Scrolling Through a List of Rows


Using SUSPEND SESSION and RESUME SESSION

What SUSPEND SESSION Does

When the program issues a SUSPEND SESSION statement, the DBMS releases all resources associated with the SQL session except those needed to resume the current session and transaction:

SUSPEND SESSION does not cause a commit or rollback of work.

What RESUME SESSION Does

RESUME SESSION reestablishes the active SQL session and database transaction. All characteristics and cursor positions of the session and transaction are restored to what they were when the program issued the SUSPEND SESSION statement.

In a pseudoconversational program, RESUME SESSION must be the first SQL statement the application issues after a SUSPEND SESSION statement.

Advantages of Suspending and Resuming

Since a suspended session preserves database transaction and SQL session characteristics, you can use SUSPEND SESSION and RESUME SESSION in these types of applications:

The following sections discuss how to use SUSPEND SESSION and RESUME SESSION in these types of processing.