COMMIT in COBOL-DB2 program and Xpeditor.
-
- New Member
- Posts: 5
- Joined: Tue Aug 12, 2014 12:49 pm
COMMIT in COBOL-DB2 program and Xpeditor.
In a COBOL-DB2 program, if we don't put a COMMIT statement and test it using Xpeditor, when will the COMMIT happen? As there is no explicit COMMIT in the program? Will Xpeditor force it?
Actually, when I tested a Cobol-DB2 program without a COMMIT in xpediter, the data base updates did not reflect in the table. Is it a normal behavior?
Actually, when I tested a Cobol-DB2 program without a COMMIT in xpediter, the data base updates did not reflect in the table. Is it a normal behavior?
Re: COMMIT in COBOL-DB2 program and Xpeditor.
What does the manual say?
Why are you not explicitly doing a COMMIT or ROLLBACK thus leaving yourself, and others, unsure as to what will happen?
Why are you not explicitly doing a COMMIT or ROLLBACK thus leaving yourself, and others, unsure as to what will happen?
Regards
Nic
Nic
Re: COMMIT in COBOL-DB2 program and Xpeditor.
In a batch DB2 program, if you don't explicitly execute a COMMIT or ROLLBACK, a COMMIT is performed when the highest level program issues a GOBACK.
In a CICS/DB2 program, if you don't explicitly execute a COMMIT or ROLLBACK, a COMMIT is performed when the highest level program issues a EXEC CICS RETURN.
In a CICS/DB2 program, if you don't explicitly execute a COMMIT or ROLLBACK, a COMMIT is performed when the highest level program issues a EXEC CICS RETURN.
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COMMIT in COBOL-DB2 program and Xpeditor.
Depending on when you're looking for the data to be in the data base, this could be normal behavior or not. If you're looking for the data while the Xpediter session is still underway, then it is normal behavior -- the program is still running as far as the system is concerned. If you're looking for the data after Xpediter has completely ended, then it is possibly not normal -- but the final determination of that depends upon other factors (such as how you're executing the program).Actually, when I tested a Cobol-DB2 program without a COMMIT in xpediter, the data base updates did not reflect in the table. Is it a normal behavior?
-
- New Member
- Posts: 5
- Joined: Tue Aug 12, 2014 12:49 pm
Re: COMMIT in COBOL-DB2 program and Xpeditor.
nicc wrote:What does the manual say?
Why are you not explicitly doing a COMMIT or ROLLBACK thus leaving yourself, and others, unsure as to what will happen?
I am trying to learn. When program executes without the xpediter the changes in the table are reflected but with it, it is not reflecting. Which is why it causes confusion.
-
- New Member
- Posts: 5
- Joined: Tue Aug 12, 2014 12:49 pm
Re: COMMIT in COBOL-DB2 program and Xpeditor.
mmcrew thank for your reply.mmcrew wrote:In a batch DB2 program, if you don't explicitly execute a COMMIT or ROLLBACK, a COMMIT is performed when the highest level program issues a GOBACK.
In a CICS/DB2 program, if you don't explicitly execute a COMMIT or ROLLBACK, a COMMIT is performed when the highest level program issues a EXEC CICS RETURN.
For my case it's a single program so after successful execution the program should commit, which it does. But with xpediter it does not. So not sure what might casue it.
Re: COMMIT in COBOL-DB2 program and Xpeditor.
Because Xpediter is the highest level' program in this case, so until the Xpediter session ends the commit is not made.
Regards
Nic
Nic
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