What is "Call by content" and "call by reference"?

Answers were Sorted based on User's Feedback



What is "Call by content" and "call by reference"?..

Answer / sruthi

Call by reference means address of var is passed to sub pgm.
The modifications on the passed vars in sub pgm will be
effected in main pgm.
call by content means value of the var is passed to sub pgm.
The modifications on the passed vars in sub pgm will not be
effected in main pgm. that is local to sub pgm.

Is This Answer Correct ?    47 Yes 2 No

What is "Call by content" and "call by reference"?..

Answer / santy

'Call by Content' means value of the variable is passed to
the subprogram and after modification on this variable in
sub-program will not effected in main program.

'Call by Address' is opposite to above. Here address of the
variable is pass to the sub-program at the time of call and
modification on this passed variable in sub-prog will be
effected in main program.

Is This Answer Correct ?    12 Yes 2 No

What is "Call by content" and "call by reference"?..

Answer / shiva

call by reference passes address of variable to the subprogram
and any changes to this variable will affect the main program

this is bcoz they have allocated the same memory..

whereas in call by content the value of the variable is
passed to the subprogram and any changes to that variable
does not affect the main pprogram..this is bcoz they have
allocated seperate memories.......

Is This Answer Correct ?    6 Yes 0 No

What is "Call by content" and "call by reference"?..

Answer / siri

CALL BY CONTENT CALL BY VALUE
---------------- ------------------
*CALL 'SUB1' BY USING CONTENT *CALL 'SUB1' BY USING REFERE
WS-VAR1 NCE WS-VAR2
*ITS NEED TO BE CODE PASS AN *ITS NO NEED TO CODE PASS AD
ELEMENT BY VALUE. DRESS ON THE VARIABLE.
*THE SUBPROGRAMS MODIFICATIONS *THE SUB PROGRAM MODIFICATIO
ON THE PASSED ELEMENTS ARE NOT NS ON THE PASSED ELEMENTS
VISIBLE IN THE MAIN PROGRAM. ARE VISIBLE IN THE MAIN PRO
GRAM.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


How to resolve the soc4 & soc7 other than following answers. Soc4 can resolved using mispleed dd name and dd name is not matching with file and soc7 check the sysdump and copy the offest address then correct it in the program.

10 Answers   ADP, Amdocs, Cap Gemini, Keane India Ltd, Super Value, TCS,


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

0 Answers  


Write some characteristics of cobol as means of business language.

0 Answers  


how many maximum no of variables can be declared in linkage section ?

2 Answers   HCL,






Syntax for JCLLIB & JOBLIB???

1 Answers  


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

0 Answers  


How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.

5 Answers   EDS,


Define in-line perform?

1 Answers  


How can you pass values from COBOL program to non-COBOL programs?

2 Answers  


When is a scope terminator mandatory?

3 Answers  


Categories