Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
find out the names of sub-programs by just mentioning main p

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: find out the names of sub-programs by just mentioning main p
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    Post subject: Re: find out the names of sub-programs by just mentioning ma
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    Post subject: Re: find out the names of sub-programs by just mentioning ma
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    Post subject: Re: find out the names of sub-programs by just mentioning ma
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    Post subject: Re: find out the names of sub-programs by just mentioning ma
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    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 pointers on using USS and C programs. Pedro All Other Mainframe Topics 0 Wed Oct 04, 2017 4:38 am
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am

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