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

Stored procedures


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swatheeswaran

New User


Joined: 04 Nov 2008
Posts: 7
Location: Chennai

PostPosted: Tue Sep 29, 2009 11:07 pm
Reply with quote

What is the difference b/w internal and external stored procedures?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Sep 30, 2009 1:30 pm
Reply with quote

euhm, that external are located outside DB2 and internal inside ?

External stored procedures : Programs (in cobol,rexx, C,...) that are compiled and the loadmodule is in some loadlib and the dbrm in another.
dbrms are bound to packages.
The external name (of the loadmodule) is given during the create stored procedure.
At runtime the loadlibs are searched for the correct loadmodule.

Internal : SQL native procedures:
The source is given during the Create stored procedure.
All executable code is in the package. no outside compiler,loadlib,... is needed.
Back to top
View user's profile Send private message
swatheeswaran

New User


Joined: 04 Nov 2008
Posts: 7
Location: Chennai

PostPosted: Wed Sep 30, 2009 10:27 pm
Reply with quote

When do we go for internal and When do we go for external?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Oct 01, 2009 1:28 pm
Reply with quote

no need for bold, my eyesight is fine,I'm not that old.

It depends on the language you want to / can program.

Internal SQL native is a little bit more performant, but limited in its possibilities.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 01, 2009 2:54 pm
Reply with quote

swatheeswaran wrote:
When do we go for internal and When do we go for external?
Are you annoyed to someone (GuyC? We'll request him not to answer your queries, if so). On these Forum CAPS or bold are considered as shouting, please avoid their use unless you're left with no choice.

When do we go for what depnds on your requirement, as name Implies the code for external stored procedure is stored outside the database. And multiple threads can call and reuse the same stored procedure by defining as reentrant.

I'm not sure, why you used the term "Internal" -- I've been using the phrase "SQL Procedures". Did you mean the same?
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Infosphere Optim - unable to save Col... IBM Tools 0
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts user exits in Column Map procedures IBM Tools 0
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top