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

DB2 Commit in CICS DB2 multi level program.....


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rbrkumaran1

New User


Joined: 12 Mar 2008
Posts: 7
Location: India

PostPosted: Fri Apr 01, 2011 8:53 am
Reply with quote

CICS / DB2 PGM A links to CICS / DB2 PGM B... table1 is updated successfully in PGM B and table 2 update fails in WHEN OTHER condition in PGM B. Here we load err msg in commarea and execute CICS RETURN to go to PGM A. In this situation whether table1 update will be commited or not?

Assumption: both the program plan are not common. They have separate plans.


Please provide me an answer on whether the COMMIT will happen for table 1 update.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 01, 2011 9:45 am
Reply with quote

OK, what bit of the manual did you NOT understand with regards to COMMIT?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 01, 2011 12:21 pm
Reply with quote

Boopathy,

since it is cics,
you need to understand syncpoint.

you should read about CICS Transaction Server for z/OS V3R1 CICS DB2 Guide
Back to top
View user's profile Send private message
rbrkumaran1

New User


Joined: 12 Mar 2008
Posts: 7
Location: India

PostPosted: Fri Apr 01, 2011 2:23 pm
Reply with quote

Nic Clouston wrote:
OK, what bit of the manual did you NOT understand with regards to COMMIT?


I do understand the concept of COMMIT and Syncpoint. The case I was explaining doesnt have them. I wanted to know how this kind of situation is handled, as my porject program has this kind of coding.

I got to know that the task number is assigned by CICS for the main program and till that task is completed, the commit will NOT be peformed though there were intermediate CICS RETURN stmts. CICS RETURN stmt should return the control to CICS to get the changes COMMITted. If the control is transferred to calling pgm, the COMMIT WILL NOT OCCUR.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 01, 2011 3:03 pm
Reply with quote

Commits are always there - even if only by default.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 01, 2011 4:04 pm
Reply with quote

the implicit commit performed by cics will not occur until the task has sucessfully completed - has nothing to do with xctls and xlinks.

if the tasks abends then cics will perform a rollback.

if your tasks end normally, then cics will perform a commit.

your situation sounds like you need to do an explict rollback when your second update fails, in order to back out the first updates - if you want to backout the first updates.


you talk about plans and prm xlinks/xctl was useless,
though it did let us know your skill level.
in cics (as in batch) everything is run under a package which includes the different plans.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts How to load to DB2 with column level ... DB2 6
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top