6. Working with Transactions and Handling Errors : Two Phase Commit : Example: Using Two-Phase Commit : if (flag = 'COMMIT') then
 
Share this page                  
if (flag = 'COMMIT') then
     exec sql connect :dbname1 session :session1
          with highdxid = :high, lowdxid = :low;
     exec sql commit;
     exec sql disconnect;
 
exec sql connect :dbname2 session :session2
          with highdxid = :high, lowdxid = :low;
     exec sql commit;
     exec sql disconnect;