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

How to know that a cobol program is a called program or not


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

New User


Joined: 02 Feb 2007
Posts: 10
Location: chennai

PostPosted: Fri Feb 02, 2007 1:17 pm
Reply with quote

how can i know that a cobol program is a called program or not
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Feb 02, 2007 1:29 pm
Reply with quote

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
View user's profile Send private message
mustafaamani

New User


Joined: 02 Feb 2007
Posts: 10
Location: chennai

PostPosted: Fri Feb 02, 2007 1:54 pm
Reply with quote

Thanks UmeySan, can i somehow the name of the calling program?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Feb 02, 2007 10:22 pm
Reply with quote

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
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top