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
 

 

Identifying Caling program name

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

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Fri Apr 18, 2014 1:25 pm    Post subject: Identifying Caling program name
Reply with quote

Is there a way to identify the calling program, when the control is in called program. I want to know to which program the control is returned after executing the return command in called program.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Apr 18, 2014 1:46 pm    Post subject:
Reply with quote

And may we know why would would need that, just write a GOBACK and it will take you back to the calling program.

However, you can pass the program name in addition during the call statement in the calling program so that called program then can know the calling program name.

I also recall of my old post which might help you.

http://www.ibmmainframes.com/viewtopic.php?t=57578&highlight=
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Apr 18, 2014 1:56 pm    Post subject: Reply to: Identifying Caling program name
Reply with quote

Why do you want to know where it is going back to?
Back to top
View user's profile Send private message
Suresh Uthirapathy

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Fri Apr 18, 2014 2:03 pm    Post subject:
Reply with quote

Rohit Umarjikar wrote:
And may we know why would would need that, just write a GOBACK and it will take you back to the calling program.

However, you can pass the program name in addition during the call statement in the calling program so that called program then can know the calling program name.

I also recall of my old post which might help you.

http://www.ibmmainframes.com/viewtopic.php?t=57578&highlight=


Actually iam analysing a existing program. So no coding is possible and also i dont know the sequence of programs that is calling or being called. In my program ( program x) i dont know where the control is returned after the return statement. Iam using INTERTEST tool for this analysis. I need to know if we have any EIB variable or system variable that holds the calling program name.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Fri Apr 18, 2014 2:19 pm    Post subject: Reply to: Identifying Caling program name
Reply with quote

Quote:
Actually iam analysing a existing program. So no coding is possible

Why is it impossible to put diagnostics in?
Why not start at the top (transaction) and work down manually - tran relates to pgma, pgma calls/links to/whatever pgmb, pgmb calls your prog - hooray!
If pgmb can call pgmc or your prog then you need to know the data (which you should already know) so that you know which path it takes.
Back to top
View user's profile Send private message
Suresh Uthirapathy

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Fri Apr 18, 2014 2:57 pm    Post subject: Re: Reply to: Identifying Caling program name
Reply with quote

Bill Woodger wrote:
Why do you want to know where it is going back to?


I want to know which program is calling my program.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 18, 2014 5:42 pm    Post subject:
Reply with quote

I dont understand frankly . Are there too many different programs that are calling/linking this sub module?

Looking from here searching the library and understanding the functionality should help you in narrowing down at the Main program
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Apr 18, 2014 5:59 pm    Post subject:
Reply with quote

Pandora-Box wrote:
I dont understand frankly . Are there too many different programs that are calling/linking this sub module?

Quite possibly; my shop has IMS and DB2 CRUD modules that must be called by any program using that object. Moreover, that module may be at the end of a call chain half a dozen routines long, with no one except the analysts maintaining the module calling the CRUD routine knowing that it is there at all.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 18, 2014 6:11 pm    Post subject:
Reply with quote

Akatsukami,

Yes.. What but I believe when I would do when I call DB2 CRUD commonly for "any" program ..I would ensure there is a logging happens so I would know through which program call the data got processed or atleast adding a field in the table
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 18, 2014 6:44 pm    Post subject: Reply to: Identifying Caling program name
Reply with quote

Semantics are key here -

Is the sub-program truly being CALLED or is it being LINKED-TO? If the latter, ask your CICS System Programmer to run a TRACE against the target transid (CICS Transid=CETR) and then you'll see the flow.

If it is being CALLED, the CICS Trace Facility doesn't recognize this and all you'll find are CICS API's from the CALLED sub-program. You won't find an AP ENTRY Trace Statement (LE Enclave) to inform you that the flow has executed the sub-program. This is one of the drawbacks of a CALL.

TS/4.2 Trace Entries ===> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/DFHS6E00.pdf?DT=20110612173106&XKS=dfhbsj11

HTH....
Back to top
View user's profile Send private message
walter ramos neto

New User


Joined: 10 Nov 2010
Posts: 1
Location: Brazil

PostPosted: Wed Jan 21, 2015 10:20 pm    Post subject: Re: Identifying Caling program name
Reply with quote

Suresh Uthirapathy wrote:
Is there a way to identify the calling program, when the control is in called program. I want to know to which program the control is returned after executing the return command in called program.


It may be that your doubt is much simplier... did you try to use the ASSIGN API ?

Code:

       77  GDA-NM-CHMR                      PIC X(8) VALUE SPACES.
       77  GDA-NM-PGM-RTN                   PIC X(8) VALUE SPACES.
                                                                   
           EXECUTE CICS ASSIGN                                     
                  INVOKINGPROG  (GDA-NM-CHMR)                     
                    RETURNPROG  (GDA-NM-PGM-RTN)                   
                      NOHANDLE                                     
           END-EXEC                                               

Let me know if that's what you're looking for.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 22, 2015 12:07 am    Post subject: Reply to: Identifying Caling program name
Reply with quote

Walter,

The ASSIGN INVOKINGPROG API would work, providing the sub-program was accessed via an XCTL or LINK API.

Because a CALL is not a native API to CICS and if the sub-program was CALLED, then iidentifying the Caller using the ASSIGN INVOKINGPROG API would return a value from the last successful XCTL or LINK API in the Task chain.

This is one of the drawbacks of a CALL.

Welcome to the forum.

HTH....
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


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