With a little creativity, SQL allows you to add a form of overloading to RPG that can really extend your toolkit.
Written by Joe Pluta
In the previous article in this series in this series, I created a simple user-defined function (UDF) that acted as an SQL interface to an RPG service program procedure. It was simple and easy to do, but the emphasis was on simple. The UDF simply passed parameters from the SQL environment straight through to the RPG procedure and returned the result. This is enough in many cases, but at other times, you might want a little more flexibility.