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

call by reference


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

New User


Joined: 16 Jun 2004
Posts: 47

PostPosted: Wed Oct 06, 2004 8:03 pm
Reply with quote

Hi friends,

i have confusion in call by reference and content, which is default, plz tell me detail....?

regards
Lakshmi
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Wed Oct 06, 2004 10:44 pm
Reply with quote

CALL BY REFERENCE is the default.

If the BY REFERENCE phrase is either specified or implied for a parameter,
the corresponding data item in the calling program occupies the same
storage area as the data item in the called program.



If the BY CONTENT phrase is specified or implied for a parameter, the
called program cannot change the value of this parameter as referenced in the CALL statement's USING phrase, though the called program can change the value of the data item referenced by the corresponding data-name in the called program's Procedure Division Division header. Changes to the parameter in the called program do not effect the corresponding argument in the calling program.
Back to top
View user's profile Send private message
veerababu

New User


Joined: 07 Nov 2004
Posts: 3

PostPosted: Sun Nov 07, 2004 1:58 pm
Reply with quote

Hi,

Its very simple.....

If it is Call by content means the values are not reflected to the calling pgm.

If it is call by reference means the values are reflected to the calling pgm.

Defalult is call by refrence.


For eg u r in main pgm and u r sending the values(through CALL BY CONTENT) 10,20 to sub pgm and u modifed the values in sub pgm.When u come to the Main pgm the values r not reflected.


If it is in the case of CALL BY REFRENCE the values r reflected.

Thanks,

vb
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 Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts Batch call online program, EXCI task ... CICS 3
No new posts CSQBGET - Call giving completion code... COBOL Programming 3
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top