IBM AS/400 Frozen Dessert Maker User Manual


 
ILE Program Using CRTBNDRPG
Example of ILE Program Using CRTBNDRPG
Figure 7 shows the run-time view of an application in which an ILE CL program
calls an ILE RPG program that is bound to a supplied service program. The appli-
cation runs in the named activation group XYZ.
Job
XYZ Activation Group
ILE CL
ILE RPG
Supplied Service
Program
*PGM(X)
*PGM(Y)
*SRVPGM(Z)
Figure 7. ILE Program Using CRTBNDRPG
Effect of ILE
The following deals with the effects of ILE on the way your program handles:
Program call The system automatically creates the activation group if it does not
already exist, when the application starts.
The application can contain dynamic program calls or static proce-
dure calls. Procedures within bound programs call each other by
using static calls. Procedures call ILE and OPM programs by
using dynamic calls.
Data The lifetime of a program's storage is the same as the lifetime of
the activation group. Storage remains active until the activation
group is deleted.
The ILE RPG run time manages data so that the semantics of
ending programs and reinitializing the data are the same as for
OPM RPG, although the actual storage is not deleted as it was
when an OPM RPG program ended. Data is reinitialized if the pre-
vious call to the procedure ended with LR on, or ended abnor-
mally.
Program data that is identified as exported or imported (using the
keywords EXPORT and IMPORT respectively) is external to the
individual modules. It is known among the modules that are bound
into a program.
Files By default, file processing (including opening, sharing, overriding,
and commitment control) by the system is scoped to the activation
group level. You cannot share files at the data management level
26 ILE RPG for AS/400 Programmer's Guide