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

Can a Sub program call another program?


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

New User


Joined: 09 May 2005
Posts: 17

PostPosted: Thu Feb 19, 2009 12:21 pm
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: 6966
Location: porcelain throne

PostPosted: Thu Feb 19, 2009 12:37 pm
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

Moderator Emeritus


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

PostPosted: Thu Feb 19, 2009 8:06 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top