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

difference between SYNCPOINT and COMMIT


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunny bunny
Warnings : 1

New User


Joined: 28 Sep 2005
Posts: 5

PostPosted: Wed Sep 28, 2005 12:29 pm
Reply with quote

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
View user's profile Send private message
mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Wed Sep 28, 2005 4:34 pm
Reply with quote

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
View user's profile Send private message
sunny bunny
Warnings : 1

New User


Joined: 28 Sep 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 9:46 am
Reply with quote

Hi,

Thanks for reply.

Can u plz explain this concept with an example to understand clearly.
Back to top
View user's profile Send private message
mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Thu Sep 29, 2005 6:40 pm
Reply with quote

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
View user's profile Send private message
ak1972

New User


Joined: 25 Aug 2005
Posts: 7

PostPosted: Sat Oct 01, 2005 6:57 am
Reply with quote

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
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 Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
No new posts Difference between CEE3250C and CEE3204S COBOL Programming 2
Search our Forums:

Back to Top