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.
Table 1. DB2 REXX Language Support packages and associated isolation levels
Package namea Isolation level
DSNREXRR Repeatable read (RR)
DSNREXRS Read stability (RS)
DSNREXCS Cursor stability (CS)
DSNREXUR Uncommitted read (UR)
Note:
  1. 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'"