There is another way to look at it....
For service programs, the service program itself needs to be in the
production environment along with the application. For bound modules,
only the application needs to be in production (it carries the code with
it). This can have maintenance considerations (we like to change the
production environment as little as possible).
Also, if I'm not mistaken you don't need to recompile programs if you're
making a module change. You can implement the module into production and
do a UPDPGM. As long as the module has not changed it's procedural
interfaces that is all you have to do. I'm not sure if the module needs
to stay in the production environment after a UPDPGM - haven't tried
that yet.
That's a couple reasons why I tend to use modules instead of service
programs in general.
Jim
Taking your module and creating a service program from it eliminates the
need to recompile (rebind) all the programs that use the module whenever
your making changes to your service program. Using binder source, you
can formally define the interface structures used to access the service
program, and maintain compatibility for prior generations of
applications that consume your service program.
There could be runtime improvements for your applications as well, if
this module is used in a large number of programs. When you bind a
module, you are copying that code into the new program object. Each
program in the call stack could be loading the same code (module) into
memory, wasting resources and time. Your program object sizes will be
smaller overall when using service programs.
Eric
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[
mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of David Foxwell
Sent: Friday, May 04, 2007 10:04 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: ILE question : parmameters, modules and service programs
Hello all,
After about 5 years since switching from RPGIII to free form, I fear
that we still have a lot to learn when about ILE.
We do not have a single service program. Instead, we use an ordinary
module containing all the exported procedures. I understand that means
the code is duplicated by each program that uses the module. My question
is, so what? What are we missing.
Another problem is when we need to add a parameter to an exported
procedure. In RPGIII. How do we do this when the procedure is called
from a hundred others?
As an Amazon Associate we earn from qualifying purchases.