Koohiisan
1005 pts. | Sep 11 2009 12:42PM GMT
Instead of subroutines, I meant to say that I was wanting to make subprocedures out of these commonly used functions (which are already subroutines, but I have to currently copy/paste them into each pgm).
Aceofdelts
410 pts. | Sep 11 2009 4:30PM GMT
Subprocedures would be the “ILE” way.
Sometimes it’s more practical to make a callable program. Mainly depends on likelyhood that this subprocedure will be modified later. If so, a subprocedure would need to be re-linked to each using program while a callable program needs no re-link.
The cost of a callable routine is in performance.
Cwc
3860 pts. | Sep 14 2009 7:52PM GMT
If you package the common procedures into a service program, nothing needs to be relinked if any of the logic in the the procedures has to be changed later on. It is only when their interfaces / signatures change, i.e, the number or type of parameters being sent or returned, that you would need to recompile the calling modules. And using binder language, you can even have the service program be backwards compatible by maintaining as many previous signatures as you want to support. This way, existing modules don’t have to be recompiled as long as they don’t need to send the new parameters, or don’t need to use the new procedures that may be added into the service program over time.
This is one of the ways in which ILE is a more powerful and flexibile development methodology than the OPM (original program model).
Koohiisan
1005 pts. | Sep 14 2009 8:08PM GMT
Thanks for the ideas! I think I will go the route of having a service program to handle these functions for me! I appreciate all the help from everyone! ^_^






