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

passing data frm called pgm to calling pgm


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

New User


Joined: 17 Jul 2005
Posts: 2
Location: bangalore

PostPosted: Fri May 12, 2006 2:57 pm
Reply with quote

hi,

I have a calling pgm(A) and called pgm (B) . how can i pass data frm B to A ?
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri May 12, 2006 3:49 pm
Reply with quote

A wild guess but I would try something like

in program-a
CALL program-b
using data-a
data-b
etc

and in program-b

you would have
PROCEDURE DIVISION USING data-a data-b etc
Back to top
View user's profile Send private message
ralph_v

New User


Joined: 07 Jul 2005
Posts: 27

PostPosted: Fri May 12, 2006 7:35 pm
Reply with quote

You can make us of CALL BY REFERENCE i.e when u edit the data in program B , you can make use of the changes when control comes to Program A
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Sat May 13, 2006 3:47 pm
Reply with quote

hi pradyumna_sethy

once the control is transferred back to calling pgm from called pgm, the data will be available to the calling pgm.

I believe this is what your calrification is all about. for more info, you can have a look in manuals.

suggestions/corrections welcomed...

gowtham
Back to top
View user's profile Send private message
pradyumna_sethy

New User


Joined: 17 Jul 2005
Posts: 2
Location: bangalore

PostPosted: Mon May 15, 2006 2:41 pm
Reply with quote

Thanks a lot
Back to top
View user's profile Send private message
Jag

New User


Joined: 07 Dec 2005
Posts: 30
Location: India

PostPosted: Wed May 17, 2006 11:10 pm
Reply with quote

Hi Friends,

The easiest way to pass the data from Pgm to Pgm is using the Copy books...and use the copy books in linkage sections..


I think this is a good method..Isn't it?
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts SCOPE PENDING option -check data DB2 2
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
Search our Forums:

Back to Top