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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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