Without hold option in a calling program and the called program issues a commit?

RDBMS from IBM.
Previous topicNext topic

Topic Author
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

Without hold option in a calling program and the called program issues a commit?

Post by Niketan » Thu Jul 14, 2016 8:08 pm

Hi,
I have a doubt for which I donot seem to find a clear cut answer. Can anyone of you please help to answer that? If a Cursor is opened without hold option in a calling program and the called program issues a commit, would the cursor be closed?




Chandan Yadav
Website Team
Website Team
Posts: 69
Joined: Wed Jul 31, 2013 10:19 pm
Zodiac: Libra

Re: Without hold option in a calling program and the called program issues a commit?

Post by Chandan Yadav » Thu Jul 14, 2016 11:38 pm

Yes it will be closed as it will be considered as single unit of work.

It's in similar way if you have abend in sub program and you are performing a roll back it will roll back changes done until last commit irrespective those were done in main program or sub program..

what happened when you tried?

Thanks,
Chandan




Topic Author
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

Re: Without hold option in a calling program and the called program issues a commit?

Post by Niketan » Mon Jul 18, 2016 12:41 pm

I am trying to write a program to tes tit but I am not expert in this area. But I think calling-program->called-porgram->commit->calling-program is complete unit of work. Why only this much calling-program->called-porgram->commit is a unit of work? Please help to understand.




nicc
Global Moderator
Global Moderator
Posts: 597
Joined: Wed Apr 23, 2014 8:45 pm

Re: Without hold option in a calling program and the called program issues a commit?

Post by nicc » Mon Jul 18, 2016 7:13 pm

Your unit of work ends when the commit is made - or end of program is reached.


Regards
Nic

Previous topicNext topic

Return to “IBM DB2.”