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
 

 

SYNCORETURN & SYNCPOINT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Fri May 28, 2010 1:38 pm    Post subject: SYNCORETURN & SYNCPOINT
Reply with quote

Would you please help to understand this commands

My doubt is why we are using SYNCORETURN & SYNCPOINT
if it can be explained with simple example thst will be help ful

Here is what my understanding

PROG A --LINK PROG B (with syncreturn)---

Prog A will pass control to prog B and stop updating any resources
Prog b CAN UPDATE The resources untill it issues a syncpoint

After SYNCPOINT the resources will be available for PROG A
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri May 28, 2010 2:18 pm    Post subject:
Reply with quote

SYNCONRETURN applies to DPL and function-shipping, so your example
Quote:
PROG A --LINK PROG B (with syncreturn)---
is DPL.

Prog A will pass control to Prog B and anything enqueued for update will remain unavailable to other tasks. Your comment "stop updating any resources" is inaccurate, at least. Any in-flight updates are still outstanding.

Prog B , running in another CICs region, can update any resources that are available to it. It cannot update anything that ProgA has held for update and has not yet committed. When ProgB returns to ProgA, any resources updated by ProgB are committed. ProgA will only commit its own updates when its task issues SYNCPOINT or at task (not program) termination.

Without SYNCONRETURN, no updates are committed until SYNCPOINT or task termination.

Garry.
Back to top
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Fri May 28, 2010 2:30 pm    Post subject: Reply to: SYNCORETURN & SYNCPOINT
Reply with quote

sorry to ask..

What actually you mean by 'COMMIT'

so you are saying if prog A link with Prog B with a SYNCONRETURN

so prog A will start its updates only after a syncpoint or task termination
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri May 28, 2010 2:48 pm    Post subject:
Reply with quote

COMMIT means the finalising of the update process.

A unit-of-work can begin the process of writing updates to, say, a VSAM file but the updates will not appear in the file until the unit-of-work is committed. Until either an explicit or implicit SYNCPOINT occurs, a task failure will result in a roll-back or backout, of the in-flight updates.

ProgA will have started the update process by issuing uncommitted writes to a file. These updates will not be in the VSAM file when ProgB is invoked unless ProgA issues SYNCPOINT before the EXEC CICS LINK(ProgB).

Similarly, ProgB can start updates against, say, another file and these will not be committed to that file until either ProgB issues a SYNCPOINT or ProgB returns to ProgA (which specified SYNCONRETURN).

ProgA can now commit or backout the VSAM updates it had started.

Since both ProgA and ProgB are part of the same task, a failure in ProgB would result in backout of any uncommitted updates that either program had initiated.

If ProgA fails after the SYNCONRETURN from ProgB has completed but before ProgA issues SYNCPOINT, then ProgB's updates are committed but ProgA's updates are rolled-back.


Garry.
Back to top
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Fri May 28, 2010 2:55 pm    Post subject:
Reply with quote

Thanks Garry

So my doubt is what is the need of this commands then

If PROG A ----link B--- then PROG A will wait untill it get the return from PROG B rite?

and in my case

i can see the flow as

prog A---link B (SYNCORETURN)---prog B--link C (SYNCORETRUN)--PROG C -link prog D (syncnreturn)----progD SYSNCPOINT---after D calls MQ

in this case what will be the use of this commands
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri May 28, 2010 3:17 pm    Post subject:
Reply with quote

The manual explains this

Quote:
Multiple DPL links to the same region
When a front-end program issues a LINK command with the SYNCONRETURN option, the mirror transaction terminates as soon as control is returned to the front-end program. It is therefore possible for the front-end program to issue a subsequent LINK command to the same back-end region.

However, when a front-end program issues a LINK command without the SYNCONRETURN option, the mirror transaction is suspended pending a sync point request from the front-end region. The front-end program can issue subsequent LINK commands to the same back-end region as long as the SYNCONRETURN option is omitted and the TRANSID value is not changed. A subsequent LINK command with the SYNCONRETURN option or with a different TRANSID value will be unsuccessful unless it is preceded by a SYNCPOINT command.


Garry.
Back to top
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Fri May 28, 2010 3:32 pm    Post subject:
Reply with quote

Thanks Garry

So i think these are mainly using for error handling during DPL env
that even if any error happend the updates done can be rolled back

Thanks Garry
Please if you have some more info with this topic...
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 How to place SYNCPOINT in VSAM . ShobhitVerma10april CICS 2 Thu Jul 03, 2014 11:14 am
No new posts TWA variable having junk value after ... Gopalakrishnan V CICS 1 Tue May 13, 2014 7:59 pm
No new posts Understanding Syncpoint : sreelu.s CICS 3 Sat Jul 13, 2013 1:57 am
No new posts Error in CICS SYNCPOINT ROLLBACK enrico-sorichetti CICS 4 Thu Mar 31, 2011 6:22 pm
No new posts Query on SYNCPOINT and SYNCORETURN abhijit.nayak01 CICS 2 Mon Jan 24, 2011 4:58 pm


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