Original Program Model Description

Application developers enter source code into a source file and compile that source. If the compilation is a success, a program object is created. The set of functions, processes, and rules that are used to directly create and run a program object is known as the original program model (OPM).

As an OPM compiler generates the program object, it generates additional code. The additional code initializes program variables and provides any necessary code for special processing that is needed by the particular language. The special processing could include processing any input parameters expected by this program. When a program is to start running, the additional compiler-generated code becomes the starting point (entry point) for the program.

A program is typically activated when the operating system encounters a call request. At runtime, the call to another program is a dynamic program call. The resources needed for a dynamic program call can be significant. Application developers often design an application to consist of a few large programs that minimize the number of dynamic program calls.

Figure 1 illustrates the relationship between OPM and the operating system. As you can see, RPG, COBOL, CL, BASIC, and PL/I all operate in this model. As of release 6.1, the BASIC compiler is no longer available.

The broken line forming the OPM boundary indicates that OPM is an integral part of IBM® i. This integration means that many functions normally provided by the compiler writer are built into the operating system. The resulting standardization of calling conventions allows programs written in one language to freely call those written in another. For example, an application written in RPG typically includes a number of CL programs to issue file overrides or to send messages.

Figure 1. Relationship of OPM to IBM i
Relationship of OPM to operating system