OPM stands for Original Program Model. OPM’s counterpart is ILE (Integrated Language Environment). OPM is characterized by the structure of one source member being compiled into one executable program
ILE on the other hand requires a two-step process to create programs. Source members are first compiled into module objects (type *MOD). For RPG, the command CRTRPGMOD (create RPG module) or PDM option 15 is used. Modules can be thought of as sub-programs. They are validated and compiled machine code, but are not executable. One or more modules must then be bound into an executable program using the CRTPGM (create program) command.
The modules created using different programming languages may be bound into the same program object. This structure applies, even if the one-step CRTBNDRPG (create bound RPG) command is used to compile the program. CRTBNDRPG command is a “wrapper” around both the CRTRPGMOD and CRTPGM commands. The module is created in library QTEMP and the two-step process is transparent to the user.
If the program is OPM, we can simply display the program’s attributes.
On the other hand, if the program is ILE, source members are not directly associated to a program. Instead a source member is used to create a module, and one or more modules are used to create a program. Displaying a program’s attributes shows – among other things – the module(s) used to create the program. By displaying the module’s attributes (DSPPGM command) we can determine the source information. Keep in mind that we need to go through this extra step because one ILE program may actually be created from multiple source members.
The CRTBNDRPG command creates the module in library QTEMP. This seems to imply that once the program is created, the module is no longer needed. The program object contains a complete copy of the module.