MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

EXEC CICS LINK, find calling program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 314
Topics: 48
Location: germany

PostPosted: Mon May 09, 2016 4:15 am    Post subject: EXEC CICS LINK, find calling program Reply with quote

Dear *,

I have one (COBOL / PL1) program A under control of CICS, this program calls one other program B (COBOL / PL1) by EXEC CICS LINK.

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
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Tue May 10, 2016 10:41 am    Post subject: Re: EXEC CICS LINK, find calling program Reply with quote

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

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 314
Topics: 48
Location: germany

PostPosted: Wed May 11, 2016 1:47 am    Post subject: Reply with quote

Thank you for your answer.

Yes, I agree, if any indicator in commarea, container is available, this would help ......, but this is not available.
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Wed May 11, 2016 12:10 pm    Post subject: Reply with quote

So make it available, if you need to know Smile

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"...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Wed May 11, 2016 12:43 pm    Post subject: Reply with quote

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

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Wed May 11, 2016 4:07 pm    Post subject: Reply with quote

Kolusu,

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 Smile

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.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Wed May 11, 2016 6:46 pm    Post subject: Reply with quote

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 Smile


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

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group