iSeries SQL UDF gets CPF426A
15 pts.
0
Q:
iSeries SQL UDF gets CPF426A
I created a SQL UDF using the iNav wizard.  It created the service program for me yet when I try to use the function I get CPF426A "User-defined function &5 cannot be invoked." with a reason 2 (Either the service program is not found or the program entry point &6 does not exist.)  It says the program entry point is the name of my function with "_1" appended to the end.  Since I didn't create the service program I have no idea how to correct this.  Can anyone help?


Software/Hardware used:
iSeries V5R4 SQL
ASKED: Nov 6 2009  3:02 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
15 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Last Answered: Nov 6 2009  3:02 PM GMT by RJonesPartrick   15 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   8080 pts.  |   Nov 7 2009  2:03AM GMT

Can you show (1) the UDF arguments and return value definitions, and (2) a statement that invokes the UDF?

Tom

 

RJonesPartrick   15 pts.  |   Nov 9 2009  2:49PM GMT

The arguments are a decimal 2,0 and a character 2. The return value is character 10. A sample statement is: select item, #MRKT_MGR(comp#,cxcode) as mrktmgr from pubprices join iim on item = iprod join iicx on iclas = cxclas where comp# = 2. The #MRKT_MGR is the UDF. The arguments are values from the file pubprices (comp#) and from iicx (cxcode).

 

TomLiotta   8080 pts.  |   Nov 27 2009  9:43AM GMT

My apologies for coming back so late. I watched for a couple days and didn’t see a reply… I should have watched for a couple days plus 13 hours. I’m a little surprised that no one else jumped in.

In case you haven’t found a resolution –

What are the column definitions of comp# and cxcode? (Particularly, their data types and lengths.) Please show the actual definitions. These should match exactly with the corresponding UDF parm declarations.

If the interface parts all match, then schema (library) attributes become of interest.

Tom

 
0