Previous Topic: RPGIV Generator Notes

Next Topic: Service Program Overview

Service Program Design and Generation

In the CA 2E model, a function type called Service Program (*SRVPGM) is defined. Service Programs can be copied, deleted, renamed, and so on, just like any other function. Service Programs have no parameters or action diagram, and they can be defined over any file. A Service Program has an associated source member, whose name is automatically allocated, but which can be changed. The source member name will be used for the final *SRVPGM object name.

Once a Service Program is created, a developer can, through a series of screens, define which existing module functions should be bound into the Service Program. Additionally, they can define one or more external (non-2E) *MODULE objects to be bound into the Service Program. For each bound module, the developer can specify which exported procedures from the module should also be exported from the Service Program.

When the Service Program is generated, a source member is created which includes both the export list, as well as several compile preprocessor directives which define how the *SRVPGM object should be created.