Calling a UDF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wellhole
    New Member
    • Jan 2008
    • 14

    Calling a UDF

    I'm trying to call a user defined function FUNCA that I created in library DEVA. "create function DEVA/FUNCA etc etc etc"

    If I go into STRSQL and try to run
    Code:
    select DEVA/FUNCA() from SYSIBM/SYSDUMMY1
    I'll get an error message "Column DEVA not in specified tables."

    If I run
    Code:
    select FUNCA() from SYSIBM/SYSDUMMY1
    I'll get an error message "FUNCA in *LIBL type *N not found."

    Does anyone know what's wrong and can suggest a way to fix this? I want to be able to use this function in a stored procedure and to call the procedure from odbc.
  • wellhole
    New Member
    • Jan 2008
    • 14

    #2
    Let me expand on this. FUNCA now has varchar and integer parameters and I can call it from iSeries client with:

    Code:
    SET PATH = DEVA;
    select FUNCA('a','b',1,2) from SYSIBM/SYSDUMMY1
    But, if I try to use this inside a stored procedure, I'll get a complaint "FUNCA in *LIBL type *N not found."

    Comment

    Working...