IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Diffrence between static call and dynamic call in cobol


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashish_setia
Currently Banned

New User


Joined: 19 Jan 2007
Posts: 3
Location: noida

PostPosted: Thu Jan 25, 2007 11:35 am
Reply with quote

Q- what is the diffrence between static call and dynamic call in cobol? please help

Warning: Title edited from call
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Thu Jan 25, 2007 11:55 am
Reply with quote

The main difference between static and dynamic call is the time at which the load module of a subroutine gets invoked or gets attached to the load module of its main program. To get a better picture, let us take an example.

Let A be the Main Program, and this main program invokes the subroutines X, Y and Z. We would have coded the modules X, Y, Z and would have compiled it before executing A.

Static Call:

Now, a static call to the modules X, Y and Z means attaching the load modules of X, Y, Z to the load module of A. It?s like creating a single pack which contains all the load modules needed to execute a higher level program which calls many other programs. This can be done by specifying the compiler option "NODYAM" while compiling the program.
All the load modules of sub routines are embedded within the load module of the main progam.

Dynamic Call:

A dynamic call to the modules X,Y and Z means that you will not attach the load modules of X,Y, Z to the load module of A. The load modules of X,Y and Z will lie in a separate library and the load module of A will lie in a separate library. You will just refer to the library in which the load modules of X,Y and Z lie, while executing the program A. So when ever the subroutines X or Y or Z are invoked in the program A, the library which is specified will be searched for the load modules. By mistake, if the library of the subroutine does not contain the referred program, the system standard library will be searched. If the program is not found in standard library too, the programs will abend. This can be done by specifying the compiler option "DYNAM" while compiling the program.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 25, 2007 11:56 am
Reply with quote

Have you tried the fine manual?

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top