Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Tue May 10, 2016 10:41 am Post subject: Re: EXEC CICS LINK, find calling program
bauer wrote:
Question: How can Program B, the called program, find out, what program is the calling program?
Is there any EXEC CICS query ...... or something like this available ?
Kind regards,
bauer
Not really unless you have the caller pass an indicator via commarea/linkage section you wouldn't know who the caller is. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Talk to your CICS sysprog(s). If unavoidable in any more reasonable way, they may be able to come up with something (going back up the call-chain, looking at CICS control blocks, something like that). Simplest will be just to give a value.
Of course, your system was written years ago, and it is only now that you "need to know"...
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Wed May 11, 2016 12:43 pm Post subject:
William Collins wrote:
Talk to your CICS sysprog(s). If unavoidable in any more reasonable way, they may be able to come up with something (going back up the call-chain, looking at CICS control blocks, something like that). Simplest will be just to give a value.
William,
Pardon my rustic knowledge of CICS, but how would sysprog know if the caller is using the simple COBOL CALL or CICS LINK ? as CALLS are invisible to CICS. You won't be able to see them in CEDF too.
Would the sysprog still be able to look at call chain even when the call is Dynamic? _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Well, I was reading the question as all from LINK, no actual CALL (a little confusion of terms in the question, so can't be certain).
Is the code generated these days for LINK the same as for CALL, and for CICS RETURN the same as GOBACK? I don't know
Yes, going back through the calling chain will work (for a CALL) whether dynamic or static. LINK is with the intention of returning from whence it came, so I'd expect that to work as well. Would there be any difference in the code? See the previous paragraph.
I think to want to use something exotic the need would have to be dire. I'd strongly hunt for a COBOL- and/or PL/I-only solution first. Relying on the name of an actual program, rather than a "logical" business-process name, is... dodgy. Retrofitting something? Possiblemaybeperhaps.
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Wed May 11, 2016 6:46 pm Post subject:
William Collins wrote:
Kolusu,
Is the code generated these days for LINK the same as for CALL, and for CICS RETURN the same as GOBACK? I don't know
William,
I think the code generation is a bit different in case of LINK as CICS can send control over to another CICS region where as the processing of CALL will always remain in the same region. With WLM in picture it might be routed to the least busy region.
William Collins wrote:
Yes, going back through the calling chain will work (for a CALL) whether dynamic or static.
The issue I see with looking at the call chain is that sometimes TSO would emulate the call under the covers as if it is doing a TSO function (especially when working with REXX and ISPF services). So you need to be really careful about who is the real caller. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum