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

Finding the Called Program if no parameters passed


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 20, 2007 6:02 pm
Reply with quote

Hi Phil,

No i don't think you are missing things. . . It is just one of those questions that very seldom comes up.

Anu - why is this of interest? If we knew the reason behind the question, we might be able to better reply.

As i believe someone mentionied earlier, one way to do this might be to chase control blocks, but unless there was a strong reason to do so, that would be a considerable bit of work for an unknown as yet requirement.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Wed Jun 20, 2007 6:14 pm
Reply with quote

HI,
It's not at all possible to identify the calling program of the subroutine by looking at itself.But if you wants to find the same anyhow here is the possible way
You can search the library of the all programs for the subroutine name.
(for particular string) using file-aid. may be supper search.


Thanks,
Santosh.
Back to top
View user's profile Send private message
TG Murphy

Active User


Joined: 23 Mar 2007
Posts: 148
Location: Ottawa Canada

PostPosted: Wed Jun 20, 2007 11:22 pm
Reply with quote

I think Santo is on to something.

Anu2 is doing impact analysis. He just wants to know which programs use program A.

My original read on the question was that he wanted program A itself to be able to find out who its caller is - this taking place when the program executes.

Searching your source libraries should help answer this question but as someone already mentioned, searching is not foolproof. Program names are often built dynamically (ie. STRING this and that) or retrieved from a database. We have a 2 DB2 tables here that contain program names and doing a search of source libraries will not uncover these...

Anu2 - are we on the right track here?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 21, 2007 12:41 am
Reply with quote

Hello,

Yup, it might be impact analysis.

When i read this
Quote:
My original read on the question was that he wanted program A itself to be able to find out who its caller is - this taking place when the program executes.
one of my thoughts was that there was interest in seeing what might have called an already running (sub)program (say it was detected by some monitoring process). Another was that there might be interest in the program being able to determine how it was invoked - called or executed - then the info would be available without requiring a change to any callers.

I didn't read this a something that might be impact analysis. Very likely my misunderstanding icon_redface.gif

Hopefully, Anu will set me straight icon_smile.gif
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Using API Gateway from CICS program CICS 0
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top