Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Could we identify the called modules using loadlib?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
elixir1986
Warnings : 1

New User


Joined: 10 Nov 2015
Posts: 21
Location: USA

PostPosted: Fri Jul 14, 2017 1:53 am    Post subject: Could we identify the called modules using loadlib?
Reply with quote

Hi,

Is it possible to get the names of the called module using cobol batch/online loadlibs?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Fri Jul 14, 2017 2:06 am    Post subject:
Reply with quote

It is not possible to get all of them. Dynamic calls allow a COBOL program to use
Code:
CALL WS-PROG-VAR USING ...
where WS-PROG-VAR has the name of the program to call. This program does NOT have to be linked into the load module but may be a totally separate load module -- as long as it is available at run time (through the link list or STEPLIB). Hence without actually running the program, you have no idea that it is calling the program that is the value in WS-PROG-VAR.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2299
Location: NY,USA

PostPosted: Fri Jul 14, 2017 10:41 pm    Post subject:
Reply with quote

Quote:
Is it possible to get the names of the called module using cobol batch/online loadlibs?
Why is it required to get it from loadlib only or is just that you are curious to know with no real requirements ?
Back to top
View user's profile Send private message
elixir1986
Warnings : 1

New User


Joined: 10 Nov 2015
Posts: 21
Location: USA

PostPosted: Fri Jul 14, 2017 10:54 pm    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Quote:
Is it possible to get the names of the called module using cobol batch/online loadlibs?
Why is it required to get it from loadlib only or is just that you are curious to know with no real requirements ?


This is a real time requirement to identify the cobol subroutines called by cobol programs.

There are many copybooks in each of the cobol programs, the copybooks have a potential to have call statements.
There are many copybooks in each of the subroutines, the copybooks again have a potential to have call statements.

The copybooks in turn have potential to have other copybooks in them and so on..

This mainframe system has been around for a long time now. There is no one very sure about how call statements were designed.(10000 cobol online/batch modules)

In addition, to make things complex, there are many modules where in the subroutines are inferred in the main program, subroutines and copybooks from files using occurs clause and/or move by reference.

Thanks for all responses!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jul 14, 2017 11:05 pm    Post subject:
Reply with quote

You can identify the CALL statements by doing a source scan for CALL. However, only by having a person examine the CALL statement can you tell if the subprogram can be known at compile time or not (that is, identified without running the program). For example, the following code would be perfectly valid:
Code:
ACCEPT WS-PROG-VAR.
CALL WS-PROG-VAR
so it is possible that parameters are being used to define which subprogram to call.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2299
Location: NY,USA

PostPosted: Sat Jul 15, 2017 1:39 am    Post subject:
Reply with quote

I have a REXX macro which will expand all the copybooks and the contents and it can be modified to expand the CALL Subprograms too but again you still got to do one main module at a time by a person.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Identify who, from where, sign on CIC... Weilin Wen CICS 1 Thu May 09, 2019 1:23 pm
No new posts Convert CICS Modules to AMODE ANY CICSWOLF PL/I & Assembler 6 Fri Feb 08, 2019 7:10 pm
No new posts REXX identify the last/latest created... sivatechdrive CLIST & REXX 7 Thu Jan 24, 2019 12:15 pm
No new posts LE Modules in Link Edit John Poulakos COBOL Programming 1 Sat Apr 28, 2018 12:14 am
No new posts Need to identify top 10 costly or tim... ashek15 DB2 4 Wed Feb 14, 2018 3:20 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us