OPM-Compatible Application
Example of OPM-Compatible Program
Figure 6 shows the run-time view of a sample application where you might want an
OPM-compatible program. The OPM application consisted of a CL program and
two RPG programs. In this example, one of the RPG programs has been moved to
ILE; the remaining programs are unchanged.
Job
Default Activation Group
OPM CL
ILE RPG
OPM RPG
*PGM(X)
*PGM(Y)
*PGM(Z)
Figure 6. OPM-Compatible Application
Effect of ILE
The following deals with the effects of ILE on the way your application handles:
Program call OPM programs behave as before. The system automatically
creates the OPM default activation group when you start your job,
and all OPM applications run in it. One program can call another
program in the default activation group by using a dynamic call.
Data Storage for static data is created when the program is activated,
and it exists until the program is deactivated. When the program
ends (either normally or abnormally), the program's storage is
deleted. To clean up storage for a program that returns without
ending, use the Reclaim Resource (RCLRSC) command.
Files File processing is the same as in previous releases. Files are
closed when the program ends normally or abnormally.
Errors As in previous releases, the compiler handles errors within each
program separately. The errors you see that originated within your
program are the same as before. However, the errors are now
communicated between programs by the ILE condition manager,
so you may see different messages between programs. The mes-
sages may have new message IDs, so if your CL program moni-
tors for a specific message ID, you may have to change that ID.
24 ILE RPG for AS/400 Programmer's Guide