Previous Topic: Service Program OverviewNext Topic: Edit Function Details Panel


Service Program Functions

The new Service Program Support allows developers to create service program functions, which are functions that equate to i OS *SRVPGM objects and can be thought of as containers for one or more *MODULE functions. As with modules, you cannot directly call service programs. However, when a program function is compiled into a *PGM object, if it finds the service program (which contains the module) in the binding directory before it finds the module itself, it performs a bind-by-reference, wherein it simply contains a reference (link) to the module object in the service program and does not itself contain a copy of the module object. At runtime, the program resolves (calls) to the copy of the module contained in the service program (so the service program needs to be available).

Using service programs in this manner provides the benefit of improved performance, due to one-time object resolution, but ensures that a change in any of the modules contained in the service program does not require a change in the calling program, as detailed in the following diagram.

Service Program Functions