CALLX

SEPT(4267), QMHSNDMOL, \;

 

/\ resume normal array

constraint

\/

OVRPGATR

1,4;

 

/\ and move on to the next entry

\/

ADDN(S)

NUM_DONE, 1;

 

ADDSPP

OBJ_ENTRY@, OBJ_ENTRY@, 32;

 

CMPNV(B)

NUM_DONE, SIZE / LO(MORE);

 

/\ When all entries are processed, end the program.

\/

/\

 

\/

/\ Note that this program may not actually display all obje￿cts

\/

/\ in QTEMP. If L_BYTAVL is greater than L_BYTPRV, additional

\/

/\ objects were inserted into QTEMP between the time of the￿

\/

/\ "small" MATCTX and the "large" MATCTX. The processing of these \/

/\ additional objects is not addressed in this program and ￿is

\/

/\ the responsibility of the user of this program.

\/

/\

 

 

\/

DONE:

RTX

\;

 

 

PEND;

 

 

AS/400 Program Storage

On AS/400

systems,

two

steps are needed to

run

a

program: program activ

and program invocationProgram. activation

is

the

process

of

allocating

and

ini-

tializing static

storage for Programthe invocationprogram.

 

is

the

process

of

allo-

cating

and

initializing automatic

storage.

 

 

 

 

 

 

 

 

 

 

 

Program Activation

and

Static

Storage:

Program

activation

can

be

done

explic-

itly through the Activate Program (ACTPG) instruction or implicitly

by

using

external (CALLX) instruction when the called

program

has

not

been

previous

vated. Program activation typically occurs

only once within a job

or

pro

Program activation is not reset by an RTX

instruction

within

the

called

program is still considered to be in an

activated

 

state). This

means th

storage on subsequent calls (CALLXs) to the

program

are

found

in

a

last

state,

not

in

a

reinitialized

state. If

a

programmer

wants

to

reinitia

storage associated with a program activation, this can be accomplished

deactivate

program (DEACTPG)

instruction

so

that

the

next call (CALLX

or

A

causes

a new

activation

of the

program.

 

 

 

 

 

 

 

 

Program

Invocation

and

Automatic

Storage:

 

 

Program invocation, on the other

 

 

hand, occurs every time a

program is called with a CALLX instruction. Au

storage is reinitialized if a discrete INIT value was specified on

 

statement. (If the INIT was

allowed

to

be

the

default,

then whethe

tion

occurs

for

the

field

is

determined

by

an option of the QPRCRTPG

 

the

program

was

created.)

If

you

have

not

already

done

so,

review

a

template

values

 

available

on

the

QPRCRTPG

API before

developing

your

MI

 

cations.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7-36System API Programming V4R1

Page 176
Image 176
IBM Version 4 manual AS/400 Program Storage, Process Allo Cating Initializing automatic Storage