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

Commit/Rollback DB2 in IMS program


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

New User


Joined: 26 Aug 2008
Posts: 6
Location: India

PostPosted: Thu Aug 28, 2008 10:29 am
Reply with quote

I am coding DB2 sql statements inside a IMS DB/DC program. Can we use SQL COMMIT and SQL ROLLBACK statements inside the IMS program? If not then how can we commit or rollback DB2 ?

Any inputs in this regard would be appreciated.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Sun Sep 07, 2008 2:51 am
Reply with quote

Hello,

Oh Yes, I remember i did it long time back...

The SQL verbs COMMIT and ROLLBACK are not valid in IMS/TM program, When an IMS checkpoint is issued in a IMS/TM-DB2 a two phase commit is performed to synchronize the updates made to IMS database with those made to DB2 tables.A component of IMS/TM called the syncpoint coordinator handles the coordiantion of commits.

You can code the IMS checkpoint command which implements the COMMIT as follows:

CALL 'CBLTDLI' USING NUM-OPS,
'CHKP',
IO-PCB,
CHKP-LENGTH,
CHKP-AREA.

You can also code the IMS rollback command as follows:

CALL 'CBLTDLI' USING NUM-OPS,
'ROLB',
IO-PCB,
CHKP-LENGTH,
CHKP-AREA.

In short the IMS commits the data in DB2 as well with the IMS-DB when checkpoint is issued.....same is the case with rollback...

Regards,
Rajat
Back to top
View user's profile Send private message
balasubra

New User


Joined: 26 Aug 2008
Posts: 6
Location: India

PostPosted: Mon Sep 08, 2008 11:28 am
Reply with quote

Hi Rajat,

Can you please tell me how CHKP-LENGTH and CHKP-AREA should be declared in the IMS-DB2 program and where should it be declared?

Also, I believe IO-PCB is the PCB mask we declare in an IMS/DC MPP program. Correct?


Thanks,

Bala.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Sep 10, 2008 10:01 am
Reply with quote

Hello Balasubra,

Well from here I ask you to follow the link below:

[url]http://publibz.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dfsp20d1/1.4.3[/ur

I hope this will help you....

Regards,
Rajat
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