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

Commit the updates done only by stored procedure


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

New User


Joined: 25 Feb 2009
Posts: 2
Location: Bangalore

PostPosted: Wed Feb 25, 2009 9:41 pm
Reply with quote

Hi,

I have a cobol-db2 program calling a cobol-db2 stored procedure.
Is there any way to commit the updates done only by stored procedure.

I need to know that is there a possibility of autonomous commit in DB2?


Please provide your ideas..

Thanks in advance,
Vijay,
IBM India
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Feb 25, 2009 9:56 pm
Reply with quote

If your main program updates data and then calls sub routine which commits ; all the changes will be committed ....because the entire process is a single unit of work ...
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: Thu Feb 26, 2009 1:57 am
Reply with quote

Hello,

Suggest you consider a different design approach that will not allow/require interleaving multiple uits of work. . .

If you explain what the process needs to do, someone may have a suggestion.
Back to top
View user's profile Send private message
Vijay Vemuri

New User


Joined: 25 Feb 2009
Posts: 2
Location: Bangalore

PostPosted: Thu Feb 26, 2009 12:31 pm
Reply with quote

My requirement is

need to store the displays of stored procedure in DB2 table instead of WLM log.

Can any one provide suggesions how to do this?

Thanks,
Vijay.
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: Thu Feb 26, 2009 8:55 pm
Reply with quote

Hello,

Quote:
need to store the displays of stored procedure in DB2 table instead of WLM log.
I believe this needs some clarification.

If the sp inserts some rows in a table and does not issue a commit what will be the problem having the unit-of-work controlled by the main program? When the main program issues a commit, all uncommitted actions will be committed. Similarly, if the main program rolls back the work, the entire unit of work will be rolled back.
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 Invoke stored procedure via batch JCL. DB2 2
No new posts Positioned Deletes/Updates using curs... DB2 3
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top