What is "Call by content" and "call by reference"?
Answers were Sorted based on User's Feedback
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 |
'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 |
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 |
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 |
suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.
Can anyone please give the example of Inline Perform.
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
have in 100 records in a file i want to move only matched records to one output_file1 and nonmathed records are moved to another output_file2 ... any one can provide logic code
What are literals?
wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
How do you set a return code to the JCL from a COBOL program?
How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?
How can we know that cobol program is using report file or simple file....?
How do u know what version of cobol u are using?
Without using move verb how to move one variable to another.