Page 1 of 1

Table Functions (UDTFs) & RPGLE

Posted: Thu Jun 22, 2023 3:34 pm
by sandrocarosso
Good evening everyone,

I would like to take advantage of the possibility of using Table Functions (UDTFs) to reuse the logic expressed within my RPG ILE program. Within this program, I have to make a selection based on the parameters received (specifically, an article code could be indicated in full or only a portion, rather than the product category). How should I set up the doFetch routine (as given in the example from Scott's manual) such that code (or codes) that meet the required criteria is selected?

Thanks in advance

Re: Table Functions (UDTFs) & RPGLE

Posted: Thu Jun 22, 2023 4:17 pm
by Scott Klement
I am not familiar with your database or your logic to search on article codes. But, this question doesn't appear to be related to UDTFs or a "doFetch" routine... but rather it seems to be just "how do I use a database to search for all or part of an article code in RPG?"

Do you know how to do this inside RPG for something that's not a UDTF? If so, do it the same way in the UDTF.

Re: Table Functions (UDTFs) & RPGLE

Posted: Wed Jun 28, 2023 12:42 pm
by sandrocarosso
Hi Scott, thanks for the reply. Obviously, I know how to make selections on a database. I will carry out more tests in this direction.