With in these three which one is the default one Call
Reference, Call By Value, Call By Content.-Which one is
default?
Answers were Sorted based on User's Feedback
Answer / shilpa
we can call the subprogram by refarence or content, but
call by refarence is default.
call by refarence: when we are passing the value from
mainprogram to subprogram if any changes in subprogram it
reflect also in main program but in call by content if any
changes in subprogram it wont reflect on mainprogram.
we can call the subprogram by dynamically or statically.in
this scenario the default is static call. in dynamic call
we call the program by value. in static call we call the
program by literal.
first we understand the main difference between static call
and dynamic call.
if any changes in subprogam in static call it will reflect
in msin program so we can recompile the mainprogram again
but not in dynamic. if we want to change any call program
just change the program name no neeed to change again and
again.dynamic call is faster compared to static call.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / asmara
Call By Reference is the default one.
1) Call By Reference passes the field to the called program
(sub-program). Any changes to the fields is done in the
calling program.Both will occupy same memory space.
2)Call By Content passes a copy of the fields to the called
program(sub-program). Any changes will not affect the
fields in the calling program(Main Program).
3)Call By Value refers to the address of the value (sent by
the calling program) & any change made here will be
reflected in the calling program. In these Both the Actual
and Dummy Parameters are occupy different memory space.
We will called as Formal Parameters in COBOL and where in
PL/I we called it as Dummy parameters.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sreeram
refer ans 2
In addition to the above, there is no diff b/w call by
value and call by content - both are same
| Is This Answer Correct ? | 1 Yes | 2 No |
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
What is the difference between a binary search and a sequential search?
why occurs clause not mentioned in 01 level
6 Answers HCL, NIIT, TCS, Tesco,
DATAONLY, MAPONLY functionality?
Explain about Redefines cluse?
what are the control characters used in reports
How do you code Cobol to access a parameter that has been defined in JCL?
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
how would find total records in files using seqientional
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.
I had 100 records and i want to execute last three records by using cobol programming?what will be coding?