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
 

 

call by reference

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: call by reference
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    Post subject:
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    Post subject: Re: call by reference
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    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 Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm


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