IBM AS/400 manual Example of OPM-Compatible Program, Effect of ILE, OPM-Compatible Application

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 48
Image 48
Example of OPM-Compatible Program

OPM-Compatible Application

Example of OPM-Compatible Program

Figure 6

shows the run-time

view

of

a

sample

application where you might

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

ILE; the

remaining programs

are

unchanged.

 

Job

Default Activation Group

*PGM(X)

OPM CL

*PGM(Y)

ILE RPG

*PGM(Z)

OPM RPG

Figure 6. OPM-Compatible Application

Effect of ILE

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

Program call

OPM programs behave as before. The system automatically

 

 

creates

 

the

 

OPM

default

activation

group

when

you start

yo

 

and all OPM applications run in it. One

program

can

call

anoth

 

program

in

the

default

activation

group

by

using

a

dynamic

Data

Storage

for

static

data

is

created

when

 

the program

is

 

 

and it exists until the

program

is

deactivated.

When

the

 

ends (either normally or abnormally), the program's storage i

 

deleted. To clean up storage for a

program

that

returns

w

 

ending,

use

the

Reclaim

Resource

(RCLRSC)

command.

 

 

 

 

Files

File

processing

is

the

same

as

in

previous

releases.

Files

 

closed

when

the

program

ends

normally

or

abnormally.

 

 

 

Errors

As in

previous

releases,

the

compiler

handles

errors

within

 

program separately. The errors you see that originated wi

 

program are the same as before. However, the errors are

 

communicated

between programs

by

the

ILE

condition

manager,

 

so you may see different messages

between

programs. The

 

 

sages may have new message

IDs,

so

if

your

CL

program

mon

 

tors

for

a

specific

message ID,

you

may

have

to

change

24 ILE RPG for AS/400 Programmer's Guide

Page 48
Image 48
IBM AS/400 manual Example of OPM-Compatible Program, Effect of ILE, OPM-Compatible Application