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
 

 

Can a Sub program call another program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
komal

New User


Joined: 09 May 2005
Posts: 18

PostPosted: Thu Feb 19, 2009 12:21 pm    Post subject: Can a Sub program call another program?
Reply with quote

I have a main program A which is calling Program B.

Is it possible that the sub-program B in turn call another program C?

I heard like only in MS-COBOL this type of sub-program calling is possible and not in Mainframe COBOL Batch programs but is possible in On-line programs.

Can anyone explain me is this correct or not?

Thanx,
Komal
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Feb 19, 2009 12:37 pm    Post subject:
Reply with quote

you were miss-informed about the limitations of MF-COBOL.

suggest you read the documentation.
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: Thu Feb 19, 2009 8:06 pm    Post subject:
Reply with quote

Hello,

Quote:
I heard like only in MS-COBOL this type of sub-program calling is possible and not in Mainframe COBOL Batch programs but is possible in On-line programs.
Suggest you listen no more to that particular source of mis-information. . .

If you have doubt, there is an "IBM Manuals" link at the top of the page and documentation for several current releases of mainframe cobol are available. If you find somethng in one of the manuals that is not clear, post what you found and your question. Someone here will be able to clarify.
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Thu Feb 19, 2009 10:49 pm    Post subject:
Reply with quote

Hi Komal,

As dick said you could have searched in the IBM manuals.

I got this for you from the manual.

In the PROCEDURE DIVISION, a program can call another program (generally called a subprogram in COBOL terms), and this called program can itself call other programs. The program that calls another program is referred to as the calling program, and the program it calls is referred to as the called program. When the called program processing is completed, the program can either transfer control back to the calling program or end the run unit.

It is possible in Mainframe batch programs.

Thanks,
Rajulan.
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 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 Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


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