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
 

 

Can a IMS BMP program do a DB2 rollback?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Can a IMS BMP program do a DB2 rollback?
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: 287
Location: Basel, Switzerland

PostPosted: Fri Mar 13, 2009 3:13 pm    Post subject:
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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 13, 2009 7:48 pm    Post subject:
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    Post subject:
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..

http://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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Mar 14, 2009 7:18 pm    Post subject:
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    Post subject:
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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 16, 2009 9:56 am    Post subject:
Reply with quote

Hello,

There is additional info here you may find interesting:
http://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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


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