What is the difference between Static and Dynamic Binding?

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
Asiman_Mishra
Member
Posts: 2
Joined: Thu May 31, 2012 8:30 pm

What is the difference between Static and Dynamic Binding?

Post by Asiman_Mishra » Thu May 31, 2012 8:50 pm

-> What is the difference between Static and Dynamic Binding?
And let me know the situations where static Binding is required and where dynamic binding is required?
-> Which one is more beneficial?
Asim

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu May 31, 2012 10:18 pm

Asim,
so that I can determine the context of your question,
could you provide a link to something that mentions Static and Dynamic Binding, please?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Asiman_Mishra
Member
Posts: 2
Joined: Thu May 31, 2012 8:30 pm

Post by Asiman_Mishra » Thu May 31, 2012 10:30 pm

I dnt know any link which provides these details. I want pinpoint answers for these questions.
Asim

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Jun 01, 2012 1:25 am

Well, my conception of dynamic binding only comes into play with Dynamic SQL.

so,
i will drop out of this discussion and
wait for more db2 knowledgeable members to post.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Jun 01, 2012 2:33 am

What is the difference between Static and Dynamic Binding?
I want pinpoint answers for these questions.
It will be difficult (if even possible) to provide "pinpoint" answers if such a thing does not exist. . .

It appears you have used the wrong terminology.

Where have you heard of Static or Dynamic Binding? I've not heard of such a term.

There are static and dynamic program calls and there is static and dynamic sql, but static and dynamic binding . . . :?


This post does not constitute a belief of deeper knowledge :|
Just looking for clarification. . .
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Jun 01, 2012 1:02 pm

Perhaps he is referring to the Linker/Binder program IEWL and nothing to do with DB2 at all (except when linking/binding a DB2 program)
Regards
Nic

hash33
Member
Posts: 3
Joined: Sun Jun 17, 2012 12:55 am

Static binding and Dynamic binding

Post by hash33 » Mon Jun 18, 2012 11:47 am

Static binding is where the linker copies the referred to as operate into the program's executable image from the suitable library and resolves the references to the operate at compile/link time. The program contains a duplicate of the library operate and doesn't got to load it at run time.

Dynamic binding is where the linker inserts stub code into the program's executable image that references the suitable library. The library operate is then copied into memory at load or run time and references are resolved then. The program doesn't contain a duplicate of the library operate, and also the library should be accessible at load/run time. :D
and can also help you.
Last edited by hash33 on Sun Jul 22, 2012 12:40 pm, edited 2 times in total.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Jun 18, 2012 4:49 pm

that references the suitable library
that is not true.
it only contains module entry point info for dynamic CALL.

library is never involved.

the library is listed in the step/job lib statement of the job during runtime.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

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

Post by Anuj Dhawan » Tue Jun 19, 2012 3:58 pm

Well, this is an IBM Mainframe Community Forum -- the original question, as worded, does not make any sense in zOS world.

"Static and Dynamic Binding" comes in to consideration when one talks about JAVA or C++ and this is not the correct forum for these terms.

Having said that, I do not get involved in such things but hash33 your answer is just a replica of this: http://wiki.answers.com/Q/What_is_the_d ... ic_binding
Regards,
Anuj

timitiwinkle
Member
Posts: 2
Joined: Wed Jun 20, 2012 9:24 pm

Post by timitiwinkle » Sat Jun 23, 2012 8:16 pm

yes this is in c++ language and it depends when the binding happens: at compile time (static) or at runtime (dynamic). Static binding is used when you call a simple class method. When you start dealing with class hierarchies and virtual methods, compiler will start using so called VTABLEs. At that time the compiler doesn't know exactly what method to call and it has to wait until runtime to figure out the right method to be invoked (this is done through VTABLE). This is called dynamic binding .
Last edited by timitiwinkle on Sun Jun 24, 2012 8:20 pm, edited 1 time in total.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Jun 23, 2012 11:29 pm

Suggest you speak with your dba or other support person who deals with c++/db2.

They should have a better understandng of what you want to learn.
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Jun 24, 2012 1:46 pm

C++ on the mainframe? Is this true?
Regards
Nic

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Sun Jun 24, 2012 11:14 pm

actually, IBM refers to the programming language as C/C++.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

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

Post by Anuj Dhawan » Mon Jul 02, 2012 4:17 pm

NicC wrote:C++ on the mainframe? Is this true?
I'm not sure if I got you wrong but this link has some details: http://www-142.ibm.com/software/products/in/en/czos/
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