View previous topic :: View next topic |
Author |
Message |
Hema_Manyam Beginner
Joined: 15 Dec 2005 Posts: 20 Topics: 9
|
Posted: Thu Dec 15, 2005 8:54 am Post subject: CICS - DB2 - SYNCPOINT ROLLBACK |
|
|
Hi,
I saw the queries posted on this topic, but my query is a little different.
1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB and PGMB calls PGMC. I have to do inserts, updates in all the 3 pgms.
2) Say PGMC has done its work successfully and returned to PGMB
3) PGMB had an SQL error while doing some update
4) PGMA has already done some updates before calling PGMB
Do I need to issue SYNCPOINT ROLLBACK in PGMB alone ? or
Do I need to issue SYNCPOINT ROLLBACK in PGMB & PGMA also ?
Note: all the 3 pgms are running under the same cics region, so they belong to same task.
I am new to CICS, so please do not get frustrated about my question if it is silly.
Thanks,
Hema |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Hema_Manyam Beginner
Joined: 15 Dec 2005 Posts: 20 Topics: 9
|
Posted: Thu Dec 15, 2005 11:46 pm Post subject: |
|
|
Hi Kolusu,
Thanks for your reply.
1) So my understanding is , I have to issue SYNCPOINT ROLLBACK only once in PGMB. It will rollback all the changes done by PGM A, B, C.
2) What will happen if I have issued EXEC CICS SYNCPOINT in PGMC before returning to PGMB. does it commit the changes done by PGMC alone or does it commit PGMB, PGMA changes also upto that point ?
Please advise.. Thank you. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Fri Dec 16, 2005 5:56 am Post subject: |
|
|
Quote: |
1) So my understanding is , I have to issue SYNCPOINT ROLLBACK only once in PGMB. It will rollback all the changes done by PGM A, B, C.
|
Please read the above link once again.
Quote: |
What will happen if I have issued EXEC CICS SYNCPOINT in PGMC before returning to PGMB. does it commit the changes done by PGMC alone or does it commit PGMB, PGMA changes also upto that point ?
|
Only PGMC chnages are committed.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Hema_Manyam Beginner
Joined: 15 Dec 2005 Posts: 20 Topics: 9
|
Posted: Sun Dec 18, 2005 9:54 am Post subject: |
|
|
Hi Kolusu,
Thanks for clarifying my second point.
Regarding the first point, per your advise I have read the link again. See the below lines from that link. It says that it would rollback all the changes in a task. Since PGMA, B, C belong to same task in my case, I belive it would rollback all the changes for these programs. Please correct me if I am wrong.
-----------------------------------------------------------------------------------------
" The easiest solution in your case would be to issue a SYNCPOINT ROLLBACK whenever and in whichever program you encounter the SQL error. That would rollback all the changes in your task. If you want rollbacks to certain points in your task, you can use SAVEPOINTS "
------------------------------------------------------------------------------------ |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Dec 19, 2005 2:54 pm Post subject: |
|
|
Hema_Manyam,
Just remember two thumb rules for Program Control in CICS -
When you link to a second program from the first program in CICS (without any intermediate syncpoints), both the programs still operate under the same unit of recovery. If you do a SYNCPOINT or SYNCPOINT ROLLBACK anywhere in that unit of recovery (in the 1st or 2nd program), it will commit or rollback the entire unit of recovery.
AND
EXEC CICS RETURN implies an implicit SYNCPOINT.
So, now you try to figure out what will happen for your case.
Feel free to post further if you still have any doubts.
Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
 |
Hema_Manyam Beginner
Joined: 15 Dec 2005 Posts: 20 Topics: 9
|
Posted: Tue Dec 20, 2005 12:56 am Post subject: |
|
|
Manas,
Its nice to see the 2 thumb rules. I believe, I have understood the difference now.
But one small correction to what you said. EXEC CICS RETURN implies an implicit SYNCPOINT at the highest logical level only. I got this from the link below.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnaph11/4.3.2?DT=20010710165542
Finally here is my understanding.
1) If there is no intermedaiate syncpoint in PGMA, B, C.
If SYNCPOINT ROLLBACK is issued in any PGM then it would rollback changes in all 3 programs.
2) If an intermediate syncpoint is issued in any of the PGMs then it would commit the changes in all the programs till that point. If SYNCPOINT ROLLBACK is issued here it would rollback till the last intermediate syncpoint.
Please kindly correct if I am wrong.
THanks,
Hema |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Thu Dec 22, 2005 11:18 am Post subject: |
|
|
Hema_Manyam,
You are absolutely correct on all points provided you are executing all the programs in the same CICS region.
Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
 |
|
|