Difference Between Static and Dynamic CALL



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Difference Between Static and Dynamic CALL

Postby kylashrao » Thu May 28, 2009 2:58 pm

Hi All,

I am Kailash Rao new to this forum,

this is the commonly asked Question that i need Help

What is the Difference between Static and Dynamic Call in Cobol ? with an example

Kindly help me for this

Thanks
Kailash Rao
kylashrao
 
Posts: 1
Joined: Thu May 28, 2009 1:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference Between Static and Dynamic CALL

 

Re: Difference Between Static and Dynamic CALL

Postby dick scherrer » Fri May 29, 2009 1:47 am

Hello and welcome to the forum,

The difference is whether the call is resolved by the link editor or if the call is resolved at run-time.

CALL 'THEMOD' USING FLD-1, FLD-2  is the way a static call is usually coded
CALL  THEMOD  USING FLD-1, FLD-2  is the way a dynamic call is usually coded


More info is available in the COBOL Language Reference:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Difference Between Static and Dynamic CALL

Postby Anuj Dhawan » Sun May 31, 2009 10:03 am

Static Call:- It is a call to a program which will be link edited with the main program.
Dynamic call:-It is an independent program which is link edited separately. The main program just call this program

To be more specific:

If compiled as NODYNAM:
CALL 'literal' is a static call
CALL WS-label is a dynamic call

If compiled as DYNAM:
CALL 'literal' is a dynamic call
CALL WS-label is a dynamic call
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post