If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix Stored Procedure question.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-19-11, 10:42
ZZ550 ZZ550 is offline
Registered User
 
Join Date: Jan 2011
Posts: 6
Informix Stored Procedure question.

All,

Is there a way to make a call/link to a c library function
from a stored procedure?

I don't want to run the system command from inside the
procedure to execute an external shell...If at all possible.

I'm running Informix 10.00

Thank in advance for your time.
Steve
Reply With Quote
  #2 (permalink)  
Old 10-31-11, 12:20
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
Hi Steve,

What you can do is to create a "User Defined Routine", stored procedure or function, invoking an "External Routine"

The principle is to refer to an "external name" pointing to the fullpath of a .so file ( C source compiled as shared library ). The same mechanics works with java archive files.

This should work in IDS 10.0. check your product documentation at "Programming/SQL/Guide to SQLyntax/Other syntax segments/External routine reference"

I also recommend to read this excellent post at oninit's blog site
who should make you happy.

Hope this helps

Eric
Reply With Quote
  #3 (permalink)  
Old 11-10-11, 16:15
ZZ550 ZZ550 is offline
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks for the info Eric,

That's exactly what I was looking for!

-sb
Reply With Quote
Reply

Tags
c library, informix, library, stored procedure, system

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On