Topic
  • 1 reply
  • Latest Post - ‏2013-08-01T18:19:08Z by canutri
giocot
giocot
164 Posts

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
    354 Posts

    Re: Call UDTF from Egl

    ‏2013-08-01T18:19:08Z  

    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