Can we use DB2 commit in CICS?

Customer Information Control System. Middleware and MQ Series.
Post Reply
Prakash Jha
Registered Member
Posts: 56
Joined: Sat Jun 29, 2013 1:45 pm

Can we use DB2 commit in CICS?

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

Re: Can we use DB2 commit in CICS?

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Prakash Jha
Registered Member
Posts: 56
Joined: Sat Jun 29, 2013 1:45 pm

Re: Can we use DB2 commit in CICS?

Post 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?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Can we use DB2 commit in CICS?

Post 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.
Regards
Nic
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

Re: Can we use DB2 commit in CICS?

Post by enrico-sorichetti »

Thanks for the answer enrico but if someone wrongly codes it,
thats what code reviews should prevent
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “CICS, Middleware and MQ Series.”