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;