which is better either static call or dynamic call?
and why?

Answer Posted / suresh ramaiyan

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reference the fixed block file formats from cobol programs

961


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2268


State the various causes of s0c1, s0c5 and s0c7.

885


What is report-item in COBOL?

933


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

668


What is comp-1 and comp-2?

968


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

942


What is the difference between PIC 9.99 and PIC9v99?

1072


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

909


In COBOL, what is the different between index and subscript?

1001


What is Pic 9v99 Indicates in COBOL?

975


How can you get the ksds file records into your cobol program?

886


What are the various section in data division and briefly explain them.

947


How do you define a variable of comp-1 and comp-2?

954


How to know whether the module is dynamical or statistical?

898