View previous topic :: View next topic
|
Author |
Message |
mustafaamani
New User
Joined: 02 Feb 2007 Posts: 10 Location: chennai
|
|
|
|
how can i know that a cobol program is a called program or not |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Morning Sir !
Have a look at ProcedureDivision. If ther is a USING...
then look at LinkageSection. If there you could see a four Byte LengthField like PIC S9(04) BINARY at the beginning, then the programm
gets some parameter from JCL. If there's a normal DataStructure then
the programm receives parameters from a calling Programm.
This is quiet an easy and quick way to find out. But...
If there is nothing like that, the programm could get parameters from a other programm via ExternalCopyBooks. In this way, no Linkage is used.
Regards, UmeySan |
|
Back to top |
|
|
mustafaamani
New User
Joined: 02 Feb 2007 Posts: 10 Location: chennai
|
|
|
|
Thanks UmeySan, can i somehow the name of the calling program? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you have a common source code repository or if you have some kind of source (change control) management in place, you might look there. You should be able to scan either for references to the module you are interested in. If you have multiple source repositories, it is more tedious, but you could scan each of them to see what programs call "this" module.
For common subroutines that will be called from many places, it is sometimes a standard that the calling program name is part of the data passed to the called module.
If it abends, you can see the calling program in the dump. |
|
Back to top |
|
|
|