View previous topic :: View next topic
|
Author |
Message |
sunny bunny Warnings : 1 New User
Joined: 28 Sep 2005 Posts: 5
|
|
|
|
Hai Friends,
I want to know the difference between SYNCPOINT and COMMIT.
Can u plz provide some information on that.
Title changed from "Hai Friends" to "difference between SYNCPOINT and COMMIT" : Priyesh. |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
Syncpoint, Commit and Rollback are used together.
- Syncpoint takes a copy of all the resources
- After Syncpoint, updates to the resources are made permanent after Commit.
- After Syncpoint, if updates to resources have to be backed out, then a Rollback is performed.
Hope this helps. |
|
Back to top |
|
|
sunny bunny Warnings : 1 New User
Joined: 28 Sep 2005 Posts: 5
|
|
|
|
Hi,
Thanks for reply.
Can u plz explain this concept with an example to understand clearly. |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
Take an example where the amount for your loan is deducted directly from your personal bank account.
There are two parts to this operation
1. Deduct amount from your personal account - This would require updating your personal bank account file.
2. Add the amount to your loan account - This would required updating your loan account file.
If after performing step 1, i.e. deducting amount from your personal bank account, the task is unable to perform the update of your loan account file, say because the file was closed to CICS. At this point if you just abend the transaction, the money from your personal bank account is gone, but it has not be added to your loan account.
To prevent such a thing, you would like to identify a single unit of work (UoW) within your transaction. The unit of work in this case would be deducting from one a/c and adding to the other.
At the beginning and end of each unit of work, you would do a syncpoint and a commit which would marking the beginning and end of each UoW. During the processing of a UoW, if something wrong happens, then you would issue a ROLLBACK saying none of the updates that have taken place in this UoW have to happen because something has gone wrong. If everything goes fine, then you would COMMIT the changes.
Now, for CICS to identify the beginning of each UoW, you would issue a SYNCPOINT at which point it would take a backup of all resources to which it can rollback in the event a ROLLBACK command has been issued.
Now the above example is a very simple one. But in much more complex operations you would have mutiple resources, not just files and tables where updates happen constantly. Having SYNCPOINTS during such situations would be more helpful. |
|
Back to top |
|
|
ak1972
New User
Joined: 25 Aug 2005 Posts: 7
|
|
|
|
In CICS Transactions, CICS, not DB2, is the Transaction Manager
If you issue a EXEC CICS SYNCPOINT, DB2 gets committed as well.
If you issue a EXEC SQL COMMIT, only DB2 stuff gets committed. Other resources - files, TSQs etc remain 'uncommitted'. |
|
Back to top |
|
|
|