Writing Db2 for z/OS stored procedures that use ODBA
When you are writing application programs to run in an ODBA environment, you can avoid errors by following a general pattern of ODBA calls.
Recommendation: Use only one APSB call at a time per Db2 for z/OS thread. If you have more than one APSB
active at a time and the application abends, various timing problems can occur.
If your ODBA application includes multiple APSB calls, avoid undetectable deadlocks at the PST
level by using one of the following methods:
- Before issuing each subsequent APSB call, issue DPSB and SRRCMIT calls after each set of updates.
- Use single threads in ODBA regions.
- Impose a standard sequence for accessing and updating databases across all ODBA applications.
The call pattern you follow differs depending on when the RRS-sync call is initiated.