Thanks for the link Darren. If I read about the FIRST call or the FINAL call I can't remember. I have created UDTFs in the past but only used OPEN, FETCH and CLOSE.

Rob


On 11/8/2016 4:07 PM, Darren Strong wrote:
It almost sounds like the variable is only being initialized when you
first call the function. Could this be that the function is SQL and
therefore runs in the DFTACTGRP? And in my understanding the static
variable would retain it's value until the end of the activation group.
And the DFTACTGRP woldn't end until you signoff...
That was good advice. It didn't seem to make a difference in this case,
but I've found an article on DeveloperWorks by Birgita H., including some
example code for coding an API list read in a UDTF, so I'll reform my
program around that example and see how it goes.

https://www.ibm.com/developerworks/ibmi/library/i-power-of-udtf/i-power-of-udtf-pdf.pdf

Thank you.



This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].