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) .
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
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.
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.
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.
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'.