IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 commit logic


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ckrishna

New User


Joined: 22 May 2010
Posts: 1
Location: Banglore

PostPosted: Wed May 26, 2010 12:25 pm
Reply with quote

Hi,

Can you please tell me how DB2 commit happens in batch and online programs (how it differs in both cases)? Please suggest me an article to learn about commit logic.
I thought of reading more about commit logic, when I came across a situation: Program A calls Program B to insert a row into a table one bye one. Program B inserts one row and goes back to Program A. So when the commit actually happens - 1) when program B return after inserting a single row or 2) when program A returns after entire update process. Both program A and B are batch programs. The forum has a similar post which says option 1 will be true. Please tell if you have any more idea in this.

Thanks,
Krishna
Back to top
View user's profile Send private message
Kalexin

New User


Joined: 26 May 2010
Posts: 2
Location: San Jose, CA

PostPosted: Wed May 26, 2010 1:11 pm
Reply with quote

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.sqlref/db2z_sql_commit.htm

here is a good place to start.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 26, 2010 7:58 pm
Reply with quote

Hello,

Quote:
I thought of reading more about commit logic
Yes, you should.

Quote:
The forum has a similar post which says option 1 will be true. Please tell if you have any more idea in this.
My idea is that you should never simply trust something you read in a forum . . .

COMMIT is rather straight forward. Things not yet committed may be rolled back. Having said that, you now need to read about the various ways COMMIT / ROLLBACK might happen. Running some of your own experiments is also a good way to see these behaviors first-hand.

If you try some experiments and something "strange" happens, post what you did and what happened. Someone will be able to clarify.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
This topic is locked: you cannot edit posts or make replies. Need assistance in job scheduling logic. Mainframe Interview Questions 2
No new posts Rexx Logic error while adding seperat... CLIST & REXX 3
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts Sync logic between VSAM files and DB2... COBOL Programming 9
Search our Forums:

Back to Top