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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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