Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-08-01T18:19:08Z by canutri
giocot
giocot
164 Posts
ACCEPTED ANSWER

Pinned topic Call UDTF from Egl

‏2013-08-01T14:14:50Z |

Hi all

 

i would try to call from a service part, an UDTF on Ibm i (http://www.ibm.com/developerworks/ibmi/library/i-power-of-udtf/index.html). Doe's anyone kwon if is it possible ?

Thanks in advance

 

  • canutri
    canutri
    348 Posts
    ACCEPTED ANSWER

    Re: Call UDTF from Egl

    ‏2013-08-01T18:19:08Z  in response to giocot

    Although I haven't tried for myself in EGL, it should work like this:

    Define your EGL record according to the UDTF resultset and use Open with ForEach:

    open resultSet
        with #sql{SELECT col1, col2
                          FROM TABLE(myUDTF(parm1, parm2)) AS myDerivedTable

         };

    foreach (from resultSet into myRecord)
        recordArray.appendElement(myRecord);
    end

    I type this from memory so there is likely some syntax errors.  I hope this helps.

    Daron