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 Profile Log in to check your private messages Log in
 
Call By Value & Call by Reference

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
varun

New User


Joined: 02 Mar 2005
Posts: 11
Location: USA

PostPosted: Wed Mar 02, 2005 5:36 pm    Post subject: Call By Value & Call by Reference
Reply with quote

Hi,
can any one explain how u know in a program whether we used call by value or call by reference.pl. explain with example.
Back to top
View user's profile Send private message

varun

New User


Joined: 02 Mar 2005
Posts: 11
Location: USA

PostPosted: Wed Mar 02, 2005 7:48 pm    Post subject: thanks
Reply with quote

Hi senthil,
Thanks for the reply.
can we use both call by value and call by reference in a single call.
if we do not mention any call by reference or value does it take default call by reference or call by value.
Back to top
View user's profile Send private message
ashok_bln
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 5
Location: bangalore

PostPosted: Wed Mar 02, 2005 10:26 pm    Post subject:
Reply with quote

yes i think we can use both call by content and call by reference in single program.

the default is call by reference

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

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Wed Mar 02, 2005 10:56 pm    Post subject: Re
Reply with quote

Dear Friends,

You can use CALL BY VALUE and CALL BY CONTENT in a single Call statement.

Default is CALL BY REFERENCE, So if you miss anything, it's treated as CALL BY REFERENCE.

Ex: CALL A USING B, C BY CONTENT, D BY REFERENCE.
Back to top
View user's profile Send private message
varun

New User


Joined: 02 Mar 2005
Posts: 11
Location: USA

PostPosted: Wed Mar 02, 2005 11:44 pm    Post subject:
Reply with quote

Hi,
Thanks for helping
Back to top
View user's profile Send private message
DeepaBala

New User


Joined: 20 Feb 2007
Posts: 13
Location: Trivandrum

PostPosted: Thu Feb 22, 2007 10:35 am    Post subject:
Reply with quote

what is the difference in that two type of calling ?
plz any one clear for me
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Feb 22, 2007 10:43 am    Post subject:
Reply with quote

Hi There,
Please refer this

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol4.doc/tpshr03.htm

Hope it will helpful
Back to top
View user's profile Send private message
DeepaBala

New User


Joined: 20 Feb 2007
Posts: 13
Location: Trivandrum

PostPosted: Thu Feb 22, 2007 10:54 am    Post subject:
Reply with quote

Thank u
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu Feb 22, 2007 11:59 am    Post subject:
Reply with quote

Deepbala,

Quote:
how to rectify file status 39



I this ur signature???????... I thought it was a question that u asked and had replied in my prev post.

Funny Signature ya..

Thamilzan.
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Fri Feb 23, 2007 11:36 am    Post subject:
Reply with quote

answer
call by reference and call by value are types of static call
if you look in calling programme then
1] for call by reference : in procedure division there is mntion verb USING REFERENCE OR not mention because it is in default

2] for call by content (value ): in procedure division there compulsory mention the verb USING CONTENT
I GIVEN YOU EXAMPLES
EXAMPLE1.CALL BY CONTENT
ID DIVISION
PROGRAM-ID. XXX.
WORKING-STORAGE SECTION.
LINKAGE SECION.
77 A PIC 9(2).
77 B PIC 9(4).
77 C PIC 9(6).
PROCEDURE DIVISION USING CONTENT OF A, B, C.
COMPUTE C = A + B
DISPLAY C

EXAMPLE2.CALL BY REFERENCE
ID DIVISION
PROGRAM-ID. XXX.
WORKING-STORAGE SECTION.
LINKAGE SECION.
77 A PIC 9(2).
77 B PIC 9(4).
77 C PIC 9(6).
PROCEDURE DIVISION USING REFERENCE OF A, B, C.
COMPUTE C = A + B
DISPLAY C
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 StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
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

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