IBM AS/400 Example of ILE Program, Effect of ILE, ILE Program Using CRTBNDRPG, Crtbndrpg

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 50
Image 50
Example of ILE Program

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 pr

calls

an

ILE

 

RPG program

that is bound

to

a supplied service

program.

cation

runs

in

the

named

activation

group

XYZ.

 

Job

XYZ Activation Group

*PGM(X)

ILE CL

*PGM(Y)

ILE RPG

*SRVPGM(Z)

Supplied Service

Program

Figure 7. ILE Program Using CRTBNDRPG

Effect of ILE

The following deals with the effects of ILE on the way your program

Program call The system automatically creates the activation group if it already exist, when the application starts.

The application can contain dynamic program calls or static p dure calls. Procedures within bound programs call each othe 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

l

 

the activation group. Storage remains active

until

the

activ

 

group

is

deleted.

 

 

 

 

 

 

 

 

 

 

 

The

ILE

RPG

run

time

manages

data so that

the

semantics

o

 

ending

programs

and

reinitializing the

data

are

the

same

a

 

OPM

RPG,

although

the

actual

storage

is

not

deleted

as it

 

when

 

an

OPM

RPG

program ended. Data

is

reinitialized

if

th

 

vious call to the procedure ended

with

LR

on,

or

ended

a

 

mally.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Program data that is identified as exported or imported keywords EXPORT and IMPORT respectively) is external to the individual modules. It is known among the modules that are b into a program.

Files

By default,

file

processing

(including

opening, sharing, over

 

and commitment control) by the

system is scoped to the act

 

group level.

You

cannot share

files at

the data management

26 ILE RPG for AS/400 Programmer's Guide

Page 50
Image 50
IBM AS/400 manual Example of ILE Program, Effect of ILE, ILE Program Using CRTBNDRPG, Crtbndrpg