Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database udf's

Status
Not open for further replies.

umag

Programmer
Sep 20, 2002
28
US
Hi
I want one database(informix) function to appear in impromptu to be used in preparing reports. It is not showing up. Can someone please tell me where am I doing wrong.

I have done the following steps

1.created the function in informix database
2.added this function name and definition in impfunct.ini
3.added the entries in iffunct.ini
4.added a file cogudfif.sql in cognos\cer2\bin folder

How should we make sure that wheather it is doing something..

Thanks
Uma Mahesh
 
The steps seem allright, maybe something is wrong with the syntax in the ini & sql files. Post your entries please so i can review.

Regards,

Menno
 
thanks for the reply.
Here is what I was doing

1) In impfunct.ini, this is the entry for function name
get_nxt_bus_day=

and this is for function definition at the end of impfunct.ini file

[get_nxt_bus_day]
label=exp
param=3
return=DT
1=DT;date_exp
2=NM;numeric_exp
3=CH;string_exp
exp=get_nxt_bus_day( ^1, ^2, ^3 )
tip=Syntax: get_nxt_bus_day(date,number,string) \nReturns the date of business day by the specified number.


2) This is the function declaration in cogudfif.sql file
DECLARE DATABASE FUNCTION get_nxt_bus_day( DATE, NUMBER, STRING )
RETURNS DATE
FUNCTION NAME GETNEXTDT;

3) In iffunct.ini under [Common Database Function List] section entry for function name as

get_nxt_bus_day=
and this is the entry for function details
exp=get_nxt_bus_day( ^1, ^2, ^3 )


Please go through and let me know what am I doing wrong if any. And if possible can you tell me check points to make sure wheather impromptu is doing anything about this.

Thanks in advance
Uma Mahesh
 
From my reading of the documentation, I believe that the tip1, tip2, and tip3 properties are required in your function definition - try adding them.
 
Thanks MKW42
You are absolutely right and that solved my problem few days back but forgot to update here. But anyways you are observation is very good. Do you know if the udf is having argument type date or datetime how the function should be declared and defined. I have problems with this. when I declared it as string it is working but not as date. so inside my function i am converting that string to date. that's the work around I am doing right now. I appricate your response.

Thanks
Uma Mahesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top