Page 1 of 1

Can we use DB2 commit in CICS?

Posted: Wed Mar 22, 2017 4:59 pm
by Prakash Jha
Hi,

Can we use DB2 commit in CICS? In coding practice it is said that it is not allowed but if use it then what happnes? Will it affect other programs too?

Re: Can we use DB2 commit in CICS?

Posted: Wed Mar 22, 2017 5:14 pm
by enrico-sorichetti
if it was allowed the DB2 and NON DB2 resources will get out of sync in case of abends, rollback, recovery, restart

in a transaction with no explicit commits
in case of an abend all the resources will be restored to the start of transaction state

after a db2 only commit ( if it was allowed )
the NON DB2 resources would be restored to the start of transaction state

while the DB2 resources would be restored to the AFTER THE COMMIT state

so out of sync

Re: Can we use DB2 commit in CICS?

Posted: Mon Mar 27, 2017 2:55 pm
by Prakash Jha
Thanks for the answer enrico but if someone wrongly codes it, what wrong can happen. I mean I understand from your answer that it might create a problem in restart but can it be like the CICS itself faces some problem?

Re: Can we use DB2 commit in CICS?

Posted: Mon Mar 27, 2017 3:28 pm
by nicc
What wrong can happen? Until the mis-match in data was found all processing would be invalid involving restores and reruns going back an unknown number of hours/days. CICS (if it allows it) doesn't give a toss - it is only a program. The people who use the information will be mightily annoyed and the person who made the mistake - and those who tested the code would be seriously red-faced if not looking for a new job.

Re: Can we use DB2 commit in CICS?

Posted: Mon Mar 27, 2017 5:34 pm
by enrico-sorichetti
Thanks for the answer enrico but if someone wrongly codes it,
thats what code reviews should prevent