Page 1 of 1

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

Posted: Thu Jul 14, 2016 8:08 pm
by Niketan
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?

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

Posted: Thu Jul 14, 2016 11:38 pm
by Chandan Yadav
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

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

Posted: Mon Jul 18, 2016 12:41 pm
by Niketan
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.

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

Posted: Mon Jul 18, 2016 7:13 pm
by nicc
Your unit of work ends when the commit is made - or end of program is reached.