Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: List of programs or APIs called by a particular COBOL prog:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 23, 2008 3:20 pm    Post subject: Reply to: List of programs or APIs called by a particular CO
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    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Mon Jun 23, 2008 5:15 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 23, 2008 7:24 pm    Post subject: Reply to: List of programs or APIs called by a particular CO
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Jun 24, 2008 11:48 am    Post subject: Reply to: List of programs or APIs called by a particular CO
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    Post subject:
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

Site Director


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

PostPosted: Tue Jun 24, 2008 7:58 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Jul 04, 2008 2:49 pm    Post subject: Reply to: List of programs or APIs called by a particular CO
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

Site Director


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

PostPosted: Fri Jul 04, 2008 11:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us