Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What is the difference between CALL BY VALUE and CALL BY CONTENT?




1216
views
asked mar August 3, 2014 02:13 AM  

What is the difference between CALL BY VALUE and CALL BY CONTENT?


           

1 Answers



 
answered By Mswami   0  
CALL BY VALUE and CALL by CONTENT are the same.

Difference between Pass-by-reference and Pass-by-content:

Sl #

Pass By Reference

Pass By Content

1

CALL ‘sub1’ USING BY REFERENCE WS-VAR1

CALL ‘sub1’ USING BY CONTENT WS-VAR1

(BY CONTENT keyword is needed)

2

It is default in COBOL. BY REFERENCE is not needed.

BY CONTENT key word is mandatory to pass an element by value.

3

Address of WS-VAR1 is passed

Value of WS-VAR1 is passed

4

The sub-program modifications on the passed elements are visible in the main program.

The sub-program modifications on the passed elements are local to that

sub-program and not visible in the main program.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert