×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I'm not a C programmer or an SQL expert so go easy on me. I have an ILE
C program that looks up an IP's host name. I would like to create a SQL
function for this. I want to be able to run an interactive (STRSQL)
SELECT statement like "SELECT getHost(ipAddress) from someFile". Can
this be done?
I've tried creating the SQL function but I keep getting error
"CPF503E", with error code "2 -- The external program failed before
it completed".
I was torn as to which mailing list to send it to /C400-L/ or MIDRANGE-L
so I sent it to MIDRANGE-L.
Anyone have any ideas on how to make this work?
Details below.
Thanx, PLA
Here is the SQL CREATE FUNCTION statement:
CREATE FUNCTION QGPL/GETHOST (VARCHAR (15))
RETURNS VARCHAR(132)
EXTERNAL NAME GETHOST
SPECIFIC GETHOST
LANGUAGE C
DETERMINISTIC
NO SQL
NOT FENCED
PARAMETER STYLE DB2SQL
RETURNS NULL ON NULL INPUT
NO EXTERNAL ACTION
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.