473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

external db2 UDF in C compiled on AIX

Hi All,

With reference to thread 181796, I tried the following UDF

C Source:
SQL_API_RC SQL_API_FN multi ( SQLUDF_INTEGER *in1,
SQLUDF_INTEGER *in2,
SQLUDF_INTEGER *outProduct,
SQLUDF_NULLIND *in1NullInd,
SQLUDF_NULLIND *in2NullInd,
SQLUDF_NULLIND *productNullInd,
SQLUDF_TRAIL_ARGS )
{
*outProduct = (*in1) * (*in2);
return (0);
}

Create statement:
create function multi(in1 integer, in2 integer)
returns integer
language c
parameter style sql
no sql
fenced threadsafe
deterministic
returns null on null input
no external action
external name '<path>multi!multi'

But when i try to run it, it always returns 0:
select multi(1,2) from sysibm.sysdummy1

1
-----------
0

Can someone plz help. Is the problem related to compilation?
Jun 6 '07 #1
0 1105

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matora Nickolay | last post by:
Hello. My program has to use third party components located in several external libraries. Those components, also as my program, are usually been changed. The problem is to make my program use...
8
by: Hagar | last post by:
I am currently learning C++ and am into a project for the end of the semester finals. Everything is rosy except for one feature that I want to include and can't find in my very large and...
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
4
by: Tron Thomas | last post by:
I have read that anonymous namespaces are preferred in C++ over declaring global statics because the namespace can hide information from other translation units and at the same time provide...
12
by: John Rigler | last post by:
I have successfully compiled the following UDF sample for DB2 8.1 on AIX 4.3.3. When I try to 'db2 define function' command below, I get the following errors: DB21034E The command was...
9
by: maxw_cc | last post by:
Hi to all, To explain my question I'll help myself with the following two code snippets: /*** file1.c ***/ #include <stdio.h> void print_it(void);
9
by: keith | last post by:
I created a class libery which has name space Assembly and class Assembly and compiled it. Then created a C# project and called a method in the external class e.g. Assembly dll;...
4
by: Max | last post by:
Hello, I have written a VB.NET Windows application that will be used by my customers to automate another application. I want to allow my users to execute Visual Basic code that they have...
3
by: Thomas Lenarz | last post by:
Hello, please forgive me for posting this if this problem has come up before. I could not find any hint with google. I am porting a bunch of source-code from SUN-OS to AIX at the moment and...
6
by: robintw | last post by:
Hi all, I'm trying to use some functions which are in an external library file called qhdlc.lib from within my C++ .Net program. I have a header file for this library (qhdlc.h) and have set the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.