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: 6968
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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


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