View previous topic :: View next topic
|
Author |
Message |
komal
New User
Joined: 09 May 2005 Posts: 17
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you were miss-informed about the limitations of MF-COBOL.
suggest you read the documentation. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
rajulan
New User
Joined: 11 Jan 2008 Posts: 66 Location: India
|
|
|
|
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 |
|
|
|