Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

difference between SYNCPOINT and COMMIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: difference between SYNCPOINT and COMMIT
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    Post subject: Re: difference between SYNCPOINT and COMMIT
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    Post subject: Re: difference between SYNCPOINT and COMMIT
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm
No new posts Difference between -180 and -181 with... deepak_shrivastava DB2 4 Wed Jan 06, 2016 10:00 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us