static and dynamic calls

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
mohu vellore
Member
Posts: 4
Joined: Thu Dec 10, 2009 11:25 am
Location: coimbatore

static and dynamic calls

Post by mohu vellore » Tue Dec 15, 2009 1:13 pm

When static calls are used and when dynamic calls are used

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

COBOL STATIC VS DYNAMIC CALLS

Post by Natarajan » Tue Dec 15, 2009 5:59 pm

COBOL - static call vs dynamic call.


static call -

If we use static call, load module of sub program will be added to main program/
When program execution started, main program and sub program both will be loaded into memory.

If there is a change to subprogram.
All the programs which are calling this sub program has to re-compile.


dynamic call -

If mainframe program uses dynamic call, subprogram will be loaded into memory
when call statement executed.

If there are many programs calling one sub program. if there are any changes to subprogram, wont impact calling programs. i.e, we dont required to re-compile.


---- Cases

1. If sub program needs to change frequently, better go for dynamic call.
so that calling cobol programs dont required to re-compile, every time cobol
subprogram modified.

2. If same program calling the sub program multiple times. Performance wise, better use static call. In this case, if we use dynamic call, it will load the program every time you call that program. so, in this case better you static call.
Natarajan
Chennai

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

cobol static vs dynamic calls

Post by Natarajan » Tue Dec 15, 2009 6:18 pm

Natarajan
Chennai

mohu vellore
Member
Posts: 4
Joined: Thu Dec 10, 2009 11:25 am
Location: coimbatore

Post by mohu vellore » Wed Dec 16, 2009 9:47 am

Thankyou Natarajan. your post is very much useful.

vaibhavad
Member
Posts: 2
Joined: Thu Jan 28, 2010 4:01 pm

Post by vaibhavad » Thu Jan 28, 2010 4:41 pm

Statics calls are fast as compared to dynamic calls. Choose such calls for modules with small sizes(i.e. small codes) . Static calls with bigger size can cause space error. this can be solved by REGION parameter in JOB/STEP


Dynamic calls use less memory and are slower. But are useful for programs which require frequent modifications.

Example if i have a driver job which starts the billing of the system... i choose dynamic calls

If i have a utility to extract something, i use static calls.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Jan 29, 2010 2:03 pm

vaibhavad wrote:Statics calls are fast as compared to dynamic calls. Choose such calls for modules with small sizes(i.e. small codes) . Static calls with bigger size can cause space error. this can be solved by REGION parameter in JOB/STEP
Not really - this depends on your application's requirement and dynamic calls is usually meant for smaller load modules.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others