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
 
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: 757
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
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts How do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm

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