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

SYNCORETURN & SYNCPOINT


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri May 28, 2010 2:18 pm
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri May 28, 2010 2:48 pm
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri May 28, 2010 3:17 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts MQPMO-NO-SYNCPOINT Java & MQSeries 19
No new posts How to place SYNCPOINT in VSAM . CICS 2
No new posts TWA variable having junk value after ... CICS 1
No new posts Understanding Syncpoint : CICS 3
No new posts Error in CICS SYNCPOINT ROLLBACK CICS 4
Search our Forums:

Back to Top