I have written a user SQL function in which I make a call to a C program. When I try to use it, I obtain an SQL...
error SQL0204. If I look at SYSFUNCS view, the sql_path contains '*libl'. I have V5R1 with the latest cum. Can you help me?
Hard to say without looking at your function definition and invocation, but if I had to guess, I'm guessing that your function has a character input parameter that's causing the problem. The problem is actually caused by the fact that SQL casts all character string constants to the VARCHAR data type. However, the VARCHAR type is not promotable to the CHAR type in DB2's data type promotion rules, so the function call is not compatible with the function definition. Thus, usually you can solve the problem by changing the function parameter to a VARCHAR or casting your input parameter to a character datatype (eg, Function1(CHAR('ABC')) )
You can find more details here.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.
Dig Deeper on iSeries SQL commands and statements
Related Q&A from Kent Milligan
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ... Continue Reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading
IBM did not change the default of the reuse deleted files function to YES for physical files in order to minimize the impact on any existing ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.