Forcing restricted system rules in your program
A restricted system is a DBMS that does not implement two-phase commit processing. These systems have a number of update restrictions. You can restrict your program completely to the rules for these restricted systems, regardless of whether the program is accessing restricted systems or non-restricted systems.
About this task
Accessing restricted systems
has the following limitations:
- For programs that access CICS® or IMS, you cannot update data on restricted systems.
- Within a unit of work, you cannot update a restricted system after updating a non-restricted system.
- Within a unit of work, if you update a restricted system, you cannot update any other systems.
Procedure
To force restricted system rules in your program:
When you prepare your program, specify the SQL processing
option CONNECT(1).
This option applies type 1 CONNECT statement
rules.
Restriction: Do not use packages that are precompiled
with the CONNECT(1) option and packages that are precompiled with
the CONNECT(2) option in the same package list. The first CONNECT
statement that is executed by your program determines which rules
are in effect for the entire execution: type 1 or type 2. If your
program attempts to execute a later CONNECT statement that is precompiled
with the other type, Db2 returns
an error.