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 

Called Module from Main Program List

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Sun Mar 22, 2009 1:52 pm    Post subject: Called Module from Main Program List Reply with quote

Is there a way to find out all the sub-programs/called modules from the main program list?

For example, I have 3 main program called
TEST001,TEST002,TEST003 which calls TST1,TST2,TST3 respectively.

I am trying to get a list of all the subroutines by main program. Currently I am running,ISRSUPC with SRCHFOR 'CALL ' as Parameter to get all the modules in flat file but they are not arranged properly so its tough to find that.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Mar 22, 2009 2:03 pm    Post subject: Reply with quote

Quote:
but they are not arranged properly so its tough to find that.


what do you mean by that?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun Mar 22, 2009 3:25 pm    Post subject: Reply with quote

It will be somewhat difficult to do. You are in the right track searching for call statements, though you may need something a little more sophisticated than a simple search like SuperC because the source can be formatted so that the called program name is not on the same line as the word CALL, CALL may be in a comment or may be in members you are not even using. Either way, you'll need to do the extracts and create a call tree yourself. Most people seem to do this in Rexx. The real difficulty comes when the program name is not hard coded on the CALL statement but uses a variable which contains the program name to dynamically load the program. You need to find out what values that variable can have and that will probably be a manual process. Another, more reliable option for the static calls at least is to parse the SYSADATA file (documented in the COBOL books) or maybe the listing.

There are programs that can do code analysis and give lots of structural information like this such as IBM's Rational Asset Manager (formerly WSAA) but I suspect even they would have some limitations (eg ACCEPT PGM-NAME. CALL PGM-NAME. would be unresolvable).
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Mon Mar 23, 2009 12:11 pm    Post subject: Reply with quote

VIASOFT Smart Edit got an option to display all the called program
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Wed Mar 25, 2009 4:20 pm    Post subject: Reply with quote

Perhaps try using trace and then manipulate the output from the trace. This would allow you to determine call ordering.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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