View previous topic :: View next topic
|
Author |
Message |
balasubra
New User
Joined: 26 Aug 2008 Posts: 6 Location: India
|
|
|
|
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 |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
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 |
|
|
balasubra
New User
Joined: 26 Aug 2008 Posts: 6 Location: India
|
|
|
|
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 |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
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 |
|
|
|