To acquire the isolation level the following store procedure will return a number representative the isolation level in the table below.
CREATE FUNCTION Get_Isolation_Level()
RETURNING INTEGER
RETURN (SELECT isolevel
FROM sysmaster:sysrstcb R, sysmaster:systxptab T
WHERE R.sid = DBINFO(“sessionid”)
AND T.address = R.txp);
END FUNCTION;
EXECUTE FUNCTION Get_Isolation_Level();
0 no transactions
1 dirty read (read only)
2 read committed data only
3 cursor record locked
5 repeatable reads
6 dirty read warning
7 dirty read (read only) retain U-locks
8 read committed data only retain U-locks
9 cursor record locked retain U-locks
10 dirty read warning retain U-locks
11 Last committed