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
 
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: 6970
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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

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