View previous topic :: View next topic
|
Author |
Message |
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Is there anyother ways to get the list of programs or APIs called by a particular COBOL program without scanning the program ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
what do you mean by 'SCAN'?
after you have run your obj thru the binder (actually before) you can run an AMBLIST against the load. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Thanks.
By 'SCAN', I meant ' reading the program line by line, looking for the key word CALL and getting the called program name'.
Let us say we have 10 programs in production. (p1,p2,p3.........)
In that, p1 calls p2 , p2 calls p3 , p3 calls p4 , p4 calls p5.
Now without reading the program P1 line by line, how to know that P2 is called by P1 and so on. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Hi enrico-sorichetti,
I went through the thread.
If i am not wrong, the rexx program at the end of the thread (CALLXREF ) will read the COBOL program line by line and look for CALL key word.
( partially i couldnt understand the concept behind the CALLXREF prog )
But what i am looking for is without reading the program line by line, is there any way to know list of programs called by a particular COBOL program ? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
DOCUMENTATION! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
As Craq indicated, documentation is the key. AMBLIST is a program that can run against a load module and will tell you the components -- presumably including all the static linked subroutines. However, if you have a program doing dynamic calls at run time, AMBLIST won't help you. If the program is CICS then you have to look at the code for sure, as well. Bottom line: documentation (if complete) can tell you but the only way to know for sure is code inspection -- line by line. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
What exactly are You looking for ??
if You' d tell Your exact requirements we might give better answers |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Sure...
I am working on an impact analyser tool. The tool will list the programs that are accessing a particular table.
For example: I have 10 programs ( P1, P2, P3, P4......). Here the program P5 accesses the DB2 table T1. Also the program p1 calls p3 and program P3 inturn calls P5 ( P5 accesses table T1).
Now the tool have to give the tree like below : p1 -> p3 -> p5 -> T1.
I know how to get the list of programs that hits a particular table directly.
Now I am looking for a way for getting the tree "p1 -> p3 -> p5 " without reading the program line by line.
( I wrote a program in REXX for checking line by line. Since we have huge number of programs to check with, it takes enormous time to figure out. So only I am looking for anyother alternative way to get the tree structure)
I hope, now I have put it clearly.
Thanks for you support. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Since we have huge number of programs to check with, it takes enormous time to figure out |
define huge and enormous please
on my pc I just processed a 40000 lines cobol program in about 2 seconds
but as I said in th threads I pointed You to, if You have a change management tool
You should be able to to use its reporting facilities
the AMBLIST road will take You to a much more murky territory
AMBLIST will list all the csects of a load module
it will be hard to distinguish things around
and furthermore You will get also all the "library/service" csects with lots of cleanup to do
and You will not get the dynamic called modules..
so whether You like it or not a source scan is the only way.. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
thanks for the explanation.
So I have to use the REXX program to read the programs line by line.
ok. once again thanks for your support. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
So I have to use the REXX program to read the programs line by line. |
Yes, but you also should understand that anything called dynamically will probably not be "found". |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
yes, i got it. thanks a lot. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Which will still only work for "things" called statically?
If the called module is not specified until execution, this will still not be able to detect the name to be dynamically called. . .
Which would fine most but not necessarily all modules used. |
|
Back to top |
|
|
|