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

List of programs or APIs called by a particular COBOL prog:


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Mon Jun 23, 2008 11:13 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 23, 2008 1:23 pm
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Mon Jun 23, 2008 3:13 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Mon Jun 23, 2008 3:20 pm
Reply with quote

take a look at this thread
http://www.ibmmainframes.com/viewtopic.php?t=25183&highlight=callxref
Back to top
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Mon Jun 23, 2008 4:59 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 23, 2008 5:01 pm
Reply with quote

DOCUMENTATION!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 23, 2008 5:15 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Mon Jun 23, 2008 7:24 pm
Reply with quote

What exactly are You looking for ??
if You' d tell Your exact requirements we might give better answers
Back to top
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Tue Jun 24, 2008 9:54 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Tue Jun 24, 2008 11:48 am
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Tue Jun 24, 2008 1:35 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 24, 2008 7:58 pm
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Wed Jun 25, 2008 9:28 am
Reply with quote

yes, i got it. thanks a lot.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Fri Jul 04, 2008 2:49 pm
Reply with quote

I must have had a brain check all this time
there is already a tool to do that...
ISPF OTION 4.12 - member part list
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: Fri Jul 04, 2008 11:56 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts COBOL program logic for comparisipn o... COBOL Programming 2
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
Search our Forums:

Back to Top