View previous topic :: View next topic |
Author |
Message |
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Sun Mar 22, 2009 1:52 pm Post subject: Called Module from Main Program List |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Mar 22, 2009 2:03 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun Mar 22, 2009 3:25 pm Post subject: |
|
|
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 |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Mon Mar 23, 2009 12:11 pm Post subject: |
|
|
VIASOFT Smart Edit got an option to display all the called program |
|
Back to top |
|
|
Mike Beginner
Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Wed Mar 25, 2009 4:20 pm Post subject: |
|
|
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 |
|
|
|
|