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

Can a IMS BMP program do a DB2 rollback?


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Fri Mar 13, 2009 2:51 pm
Reply with quote

Hi All,

I have a IMS BMP which reads a GSAM file and calls another set of programs which does a couple of table updates and inquiries. If any of the update failes, I need to do a roll back. Instead of doing an IMS roll back, I was trying a DB2 EXEC SQL rollback, to see if it is working. But it was not and Roll back was happening only when I did an IMS rollback.

Why the DB2 rollback is not working here. I thought It should still roll back the Current DB2 unit of work icon_confused.gif . Can anybody let me know If I miss something here?

Thanks
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Fri Mar 13, 2009 3:13 pm
Reply with quote

Rollback with EXEC_SQL under IMS monitor is prohibited!
You have to use the IMS ROLB... this will pass any ROLLBACK to DB2,
but IMS is the synchronizer! (two-phase-commit)
Similar in CICS, you have to use EXEC_CICS_SYNCPOINT, there CICS is the synchronizer...


regards,
martin9
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: Fri Mar 13, 2009 7:48 pm
Reply with quote

Hello,

Quote:
Can anybody let me know If I miss something here?
Yes, you are missing a major concept.

A transaction or "logical unit of work" (LUW) has a beginning and an end. Once begun, the LUW must be completely committed or completely backed out. It would be very poor design (and quite dangerous) for the system to permit what you attempted - rolling back part of the work while keeping another part.
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Sat Mar 14, 2009 12:14 pm
Reply with quote

Thanks Dick and Martin... It was not a requirement as per design..I was just trying out to test a scenario...

I just happened to see the following link when I was searching for an answer..

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.admin/db2z_twophasecommit.htm
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: Sat Mar 14, 2009 7:18 pm
Reply with quote

Hello,

Two-phase commit is meant for distributed processes rather than a local process that happens to use 2 different data services.
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Mon Mar 16, 2009 9:36 am
Reply with quote

Dick,

I was reffering to the below statement in the link. If I am right, I think here the coordinator is IMS and DB2 is a participant, hence only IMS can issue a rollback. Please correct me if I am wrong.

"When DB2 is the participant, it follows the decision of the coordinator, whether the coordinator is another DB2 or another DBMS"

Thanks..
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: Mon Mar 16, 2009 9:56 am
Reply with quote

Hello,

There is additional info here you may find interesting:
www.redbooks.ibm.com/redbooks/pdfs/sg246980.pdf
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top