Setting the isolation level of SQL statements in a REXX program
Isolation levels specify the locking behavior for SQL statements. You can set the isolation level for SQL statements in your REXX program to repeatable read (RR), read stability (RS), cursor stability (CS), or uncommitted read (UR).
Procedure
To set the isolation level of SQL statements in a REXX program:
Execute the SET CURRENT PACKAGESET statement to select
one of the following Db2 REXX Language Support packages
with the isolation level that you need.
Package namea | Isolation level |
---|---|
DSNREXRR | Repeatable read (RR) |
DSNREXRS | Read stability (RS) |
DSNREXCS | Cursor stability (CS) |
DSNREXUR | Uncommitted read (UR) |
Note:
- These packages enable your program to access Db2 and are bound when you install Db2 REXX Language Support.
For example, to change the isolation
level to cursor stability, execute the following SQL statement:
"EXECSQL SET CURRENT PACKAGESET='DSNREXCS'"