which is better either static call or dynamic call?
and why?
Answers were Sorted based on User's Feedback
Static call:
============
Main program load module will have sub program load module in itself. So when there is a call made to a sub program, it won't go outside of the current load.
Dynamic call:
=============
Main & Sub program will have two different modules. When there is call to a sub program, system will go and search for the load module in the joblib.
Both have advantages.
1. If the sub program is going to be changed oftentimes, then Dynamic call is better.
2. Think that, for one call, system should to the load library and search for sub program module. when it is found, load that into main memory & pass the control to that and run. when that is finished, remove it from main memory. If the sub program is getting called 1 lack times then?........... In this case, Better to use static.
I believe, you understand. Please correct me if I'm wrong.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / joshin
dynamic call is far better than static because the final
result is storeded in two records ie main program and sub
program. so when ever we need we can call the sub program
for other main program also.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mahi
dynamic call is much better than static
static call;
main program object code and sub program object code loaded
in one loadlibrary
if any change in code both has to be compiled
dynamic call;
main program object code and sub program object code loaded
in different loadlibraries
if any change in code both need not to be compiled
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / siri
STATIC CALL:-THE SUB PROGRAM CODE WILL BE SMALL AT THE TIME WE PREFERED STATIC CALL...STATIC CALL IS FAST COMPARING TO THE DYNAMIC CALL...OBJECT CODES ARE LINKED BEFORE THE EXECUTION....
DYNAMIC CALL:- SUB PROGRAM IS CALLED FREQUENTLY WE USED TO DYNAMIC CALL...OBJECT CODES ARE LINKED DURING THE EXECUTION...
SO THE PROCESS WILL BE SLOW COMPARING THE STATIC CALL..ITS NO NEED TO RECOMPILE WHEN THE SUBPROGRAM NEED TO BE MODIFIED...THIS IS BIGGEST ADVANTAGE OF THE DYNAMIC CALL....SO
FIRST WE PREFERED TO THE DYNAMIC CALL.....S
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / joshin
dynamic call is far better than static because the final
result is storeded in two records ie main program and sub
program. so when ever we need we can call the sub program
for other main program also.
| Is This Answer Correct ? | 0 Yes | 1 No |
What is the utilization of copybook in cobol?
BY seeing a program how can we say that it is static call or dynamic call
IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.
What is the size of s9(19)comp3? explain
What is file status 39 ?
If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.
using redefine can you redefine lower variable size to higher variable size?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?
Can we use icetool in cobol program?
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 want Display WS-VARX and WS-VARN?
What are declaratives and what are their uses in cobol?