Dynamically Invoke SQL UDFs From RPG Code
September 7, 2011 Hey, Mike
I’m wondering if it is possible to use dynamic SQL (prepare/execute or execute immediate) to call a User Defined [scalar] Function (UDF). I understand we can use the SET statement in our code but we would like to “soft” code some RPG business logic and we are looking at having the RPG code dynamically call certain UDFs based on certain conditions. So it would be nice to create dynamic SQL statements to call certain UDFs. Thanks! –Brian Hi, Brian: Today is your lucky day because there is a way to do this. Starting with V5R1, the VALUES INTO statement can |