Creating the Service Program

To create the service program CVTTOHEX, follow these steps:

  1. Create the module CVTTOHEX from the source in Figure 43, by entering:
        CRTRPGMOD MODULE(MYLIB/CVTTOHEX) SRCFILE(MYLIB/QRPGLESRC)
  2. Create the service program using the module CVTTOHEX and the binder language shown in Figure 45.
        CRTSRVPGM SRVPGM(MYLIB/CVTTOHEX)  MODULE(*SRVPGM)
                  EXPORT(*SRCFILE)  SRCFILE(MYLIB/QSRVSRC)
                  SRCMBR(*SRVPGM)

    The last three parameters in the above command identify the exports which the service program will make available. In this case, it is based on the source found in the member CVTTOHEX in the file QSRVSRC in the library MYLIB.

    Note that a binding directory is not required here because all modules needed to create the service program have been specified with the MODULE parameter.

The service program CVTTOHEX will be created in the library MYLIB. It can be debugged using a statement view; this is determined by the default DBGVIEW parameter on the CRTRPGMOD command. No binder listing is produced.



[ Top of Page | Previous Page | Next Page | Contents | Index ]