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

find out the names of sub-programs by just mentioning main p


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Tue Sep 05, 2006 11:52 am
Reply with quote

Hi All


Is there any method to find out the names of sub-programs by just mentioning main program name.

E.g suppose program 'A" call's program 'X" and "Y' .
then I know about pgm 'A ' . I want some method to know that pgm 'X' and "Y' are being called in pgm 'A' .

case 1 : 'A" , 'X" and 'Y' are plain COBOL programs.

case 2 : 'A" , 'X" and 'Y' are COBOL-DB2 programs. (can we find the releations by DBRM details) .

thanks
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Sep 06, 2006 4:10 am
Reply with quote

shrinivas_3,

This is not possible under all conditions. Consider the following:

1 ? By scanning the program, you should be able to pick up all of the ?static? called subroutines, those called as ?CALL ?BYSUB? USING??.

2 ? By some complex coding, you should be able to pick up the ?dynamic? called subroutines, those called as ?CALL WS_SUBNAME USING?? by searching through the code for all places where a variable or constant is moved to WS_SUBNAME including the initial value of WS_SUBNAME, and drilling down to where a constant is moved to the variable.

3 ? However, what cannot by done, is determine the subroutine name that is passed in via sysin, or parm, or file. (We do this).

So, in summary, If you are looking for ?static? subroutine names, not to hard. If you are looking for ?dynamic? subroutine name, defined within the code, much harder, but doable. If you are looking for ?dynamic? subroutine names defined outside the code, I don?t see how.

Dave
Back to top
View user's profile Send private message
sunil.sunkari
Warnings : 2

New User


Joined: 06 Sep 2006
Posts: 5

PostPosted: Wed Sep 06, 2006 8:19 am
Reply with quote

Hi,

Just try this command :

Type in "tso endvquik" with out quotes on the TSO/ISPF command line.

Once you enter the command, then you would be prompted with a screen to enter a parameter you are searching for. Here enter the program name and you can submit it as a job with the parameters mentioned on the screen.

...
Back to top
View user's profile Send private message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Wed Sep 06, 2006 10:37 am
Reply with quote

sunil.sunkari wrote:
Hi,

Just try this command :

Type in "tso endvquik" with out quotes on the TSO/ISPF command line.

Once you enter the command, then you would be prompted with a screen to enter a parameter you are searching for. Here enter the program name and you can submit it as a job with the parameters mentioned on the screen.

...


Hi

I tried with tso endvquik command , but i guess it is shop installed .
It did not worked with us.
if you can send some screen shot's of the same , it would be helpful for us.


thanks
Back to top
View user's profile Send private message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Wed Sep 06, 2006 11:56 am
Reply with quote

DavidatK wrote:
shrinivas_3,

This is not possible under all conditions. Consider the following:

1 ? By scanning the program, you should be able to pick up all of the ?static? called subroutines, those called as ?CALL ?BYSUB? USING??.

2 ? By some complex coding, you should be able to pick up the ?dynamic? called subroutines, those called as ?CALL WS_SUBNAME USING?? by searching through the code for all places where a variable or constant is moved to WS_SUBNAME including the initial value of WS_SUBNAME, and drilling down to where a constant is moved to the variable.

3 ? However, what cannot by done, is determine the subroutine name that is passed in via sysin, or parm, or file. (We do this).

So, in summary, If you are looking for ?static? subroutine names, not to hard. If you are looking for ?dynamic? subroutine name, defined within the code, much harder, but doable. If you are looking for ?dynamic? subroutine names defined outside the code, I don?t see how.

Dave





thanks Dave

I have came with one query.
if we have a case where all the programs are COBOL-DB2 type ,then i guess we can get the details by using the below query :

SELECT DISTINCT NAME FROM SYSIBM.SYSDBRM
WHERE PLNAME IN (SELECT PLNAME FROM SYSIBM.SYSDBRM
WHERE NAME = 'main pgm name ');

i guess it works for both type of calls 'static' as well as 'dynamic'.

Please comment on this.

thanks
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Finding Assembler programs PL/I & Assembler 5
Search our Forums:

Back to Top