Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to know that a cobol program is a called program or not
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: 755
Location: Germany

PostPosted: Fri Feb 02, 2007 1:29 pm    Post subject: Re: pgm is a called prgm or not
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    Post subject: Re: How to know that a cobol program is a called program or
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

Site Director


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

PostPosted: Fri Feb 02, 2007 10:22 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us