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 |
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
can we redefine 77 level item is it possible
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible
i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19
What is the difference between SEARCH and SEARCH ALL? What is more efficient?
plz,could any one tell me? what about EBCDIC in cobol?briefly?
I got user abend U4038 while compiling my runjcl.. can anyone help me?
Why occurs cannot be used in 01 level in COBOL?
Which mode is used to operate the sequential file?
why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?