Table Functions (UDTFs) & RPGLE

Any IBM i topic that does not fit in another forum
Post Reply
sandrocarosso
Posts: 7
Joined: Mon Dec 05, 2022 1:58 pm

Table Functions (UDTFs) & RPGLE

Post 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
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: Table Functions (UDTFs) & RPGLE

Post 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.
sandrocarosso
Posts: 7
Joined: Mon Dec 05, 2022 1:58 pm

Re: Table Functions (UDTFs) & RPGLE

Post 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.
Post Reply