Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Does DB2 ever automatically commit data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ASHISH GUPTA

New User


Joined: 20 Jan 2006
Posts: 1

PostPosted: Fri Jan 20, 2006 12:26 pm    Post subject: Does DB2 ever automatically commit data
Reply with quote

My query is :

Suppose I have a main module having a number of Insert/update SQL's.
The main module calls a submodule which too has number of Insert/update SQL's. I have not specified COMMIT anywhere in either of thse modules. Now, suppose after a successful call to the submodule, my main module abends, will the updates/inserts in made in my submodule be reflected, i.e committed?



I have this query because of a situation I faced during testing my module. My subprogram abends after inserting 3 records with sqlcode -803 for the 4th record.
But I find that the 3 previous records inserted are getting reflected in my database. Also, an update I made in my main calling module is also getting reflected.
Since I have not specified COMMIT anywhere in both of my programs, any idea how this can happen?


Also, does DB2 ever automatically commit data after say N number of records, even if I haven?t specified COMMIT in the program?



Thanks a lot in advance for your valuable time.



Regards,

Ashish Gupta
Back to top
View user's profile Send private message

prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jan 20, 2006 3:22 pm    Post subject:
Reply with quote

Hi Ashish,

This seems to be an interesting scenario..A commit happens when it is explicitly stated or when the program terminates successfully.
But in your case, it is a sub program which has been terminated, may be this might be the reason for the data being reflected.

A clarification reqd from ur side: Did you merely saw the inserted data in the table or did u queried the inserted data? Sometimes it is possible that u can look at the data in the table but u will be unable to fetch it. If this is the case ur data is not commited.

Please keep updated us with ur progress

Thanks & Regards
Prabs
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us