In The Spotlight
Even though we have used /Free to build some ILE programs, there are still a few more tricks for you to learn about the latest iteration of RPG.
By David Shirey
Editor's Note: This article is excerpted from article 11 of 21st Century RPG: /Free, ILE, and MVC, by David Shirey.
We are going to start by talking about two related topics: function calls and return variables.
The first thing I want to say is that this is a technique that can only be used to call a sub-procedure that is embedded in a service program or that is embedded in the module you are doing the function call from. Remember before how we did that with a CALLP? Well this is another way to do that without the CALLP. But the function call cannot be used to call one program from another; that must still be done with a CALLP. It only works when calling a sub-procedure.
The second thing I want to say is these two things (function calls and return values) go together. You can’t do one without the other.