A service program (SRVPGM) is an Integrated Language Environment® (ILE)
object that provides a means of packaging externally supported callable
routines (functions or procedures) into a separate object.
Bound programs and other service programs can access these routines
by resolving their imports to the exports provided by a service program.
The connections to these services are made when the calling programs
are created. This improves call performance to these routines without
including the code in the calling program.
Service program conditions
The SRVPGM conditions
are:
- The service program must be on an i5/OS™ system running
V5R4 or later.
- Up to seven parameters can be passed to the service program.
- By default, the adapter will create an Application-specific information
(ASI) passByType with a passByValue as
value for all the parameters associated with the service program.
The supported values are passByValue and passByReference.
You may need to set these values, corresponding to your service program
design.
- The adapter creates a property, procedureName,
on the interaction specification for the entry point found in the
program call markup language (PCML) document. The value of this property
is case-sensitive. If the CallPGM operation fails
with the message CPF226E - Value for a parameter was not valid,
then the procedureName that is set in the InteractionSpec may
be incorrect.
- The service program entry point name is converted from a Java™ String to an array of EBCDIC
bytes before being sent to the system. By default, the adapter creates
a property called Coded Character Set ID (CCSID) on InteractionSpec
with 37 as value. You can overwrite this value based on your host
environment.
- The service program is generated using a combination of multiple
modules. With the prerequisite system setup, and a valid PCML being
generated for an SRVPGM object type, you can call the service program.
Service program constraints
The programs or service
programs created using the new features available to the V5R4 compilers
can be executed only on a V5R4 OS/400® operating
system. Though the compilers generate back-level objects, these objects
are limited to the OS/400 and IBM® i operating systems.