A service program cannot be called from the command line, nor called directly from within a program using CALLB or the like. You can define only sub procedures and their interfaces in a service program then at the point of compilation create the exports. A service program ‘call’ from an ILE program is achieved by referring to a procedure exported from the service program example as follows:
D RetreiveIPAddr PR 20a extproc(‘RETREIVEIPADDR’)
D Device 10a const
* Retrieve IP Address
C eval ipaddress = RetreiveIPAddr(Device)
ensuring of course that the service program is bound in at the CRTPGM stage using the BNDSRVPGM option.