Compiling and Binding RPG Sample Programs

This section shows how to compile and bind the provided RPG sample programs.

You can find the RPG sample program source in both the QRPGLESRC source physical file of the product library, and in IFS directory EMI_HOME/samples/rpg.

The following standard ILE RPG Compiler commands are used:
  • CRTRPGMOD: create an RPG module
  • CRTPGM: create a program

Example of CRTRPGMOD

ADDLIBLE TIBEMSLIB
CRTRPGMOD MODULE(samplib/SXJRUT) SRCFILE(prodlib/QRPGLESRC)
CRTRPGMOD MODULE(samplib/SXJRMP) SRCFILE(prodlib/QRPGLESRC)

SXJRUT contains helper procedures used by the other samples to handle common activities. You must compile it ahead of the other samples so that it may be bound together with them.

Example of CRTPGM

CRTPGM PGM(samplib/SXJRMP) MODULE(samplib/SXJRMP samplib/SXJRUT) ENTMOD(*PGM)
BNDSRVPGM(prodlib/LIBTIBEMS) ACTGRP(*NEW)