So, i've developed my java class and loaded it into the IFS. What I need to end up with is a trigger on a table that calls a function which calls the java class and runs the addCourtCost method of the class. (As is described on p. 325 of the 'Stored Procedures, Triggers and User Defined Functions on DB2 Redbook' )
Now I need to create a UDF that I can call from my trigger.
So, i'm trying to create the function and I keep getting errors.
gives me error: [tt]Keyword EXTERNAL not expected. Valid tokens: ON[/tt]
I have tried moving the statements around, I have used examples from the web, I can't get it to create a function. I could get it to work as a procedure, but I'm pretty sure it needs to be a function to work like I want (if I am wrong please let me know!).
thanks for any insight!
Leslie
Now I need to create a UDF that I can call from my trigger.
So, i'm trying to create the function and I keep getting errors.
Code:
CREATE FUNCTION LANDREWS.ASSESSDOCKETFEE (
CASPRE varCHAR(2) ,
CASNUM varCHAR(7) )
RETURNS NULL
EXTERNAL NAME 'java/utilities/Java_UDFs.addCourtCosts'
LANGUAGE JAVA ;
I have tried moving the statements around, I have used examples from the web, I can't get it to create a function. I could get it to work as a procedure, but I'm pretty sure it needs to be a function to work like I want (if I am wrong please let me know!).
thanks for any insight!
Leslie