Because

the CLCRTPG

program

is

used

to

create the

initial version of M

and CLCRTPG can support only

as

many as 2000 bytes of source in the

&MIPGMSRC

variable,

MICRTPG

is

initially

defined

with

a minimal set of fun

Significant

additions

to

the

MICRTPG program can be made after it is u

building

block

in

the

creation

of

MI

programs.

 

 

In

the

initial

design

(see

the program flow on page 7-13), there are

The

first

program

is

a

CL

program

(CL03)

that

does

the following:

Ÿ Creates a user space (*USRSPC) object of 64KB size to hold the MI

ŸOverrides the MISRC file to the appropriate source physical file a

member .1/.

Ÿ Calls a second CL program (CL04), which loads the selected MISRC membe into the user space (*USRSPC).2/.

ŸCalls an MI program (MICRTPG).3/. The MICRTPG program calls CL

program CL05 .4/

and passes addressability to the *USRSPC, where CL05

then calls the

QPRCRTPG .API5/.

The MICRTPG program demonstrates how to do the following:

ŸDefine a structure

ŸInitialize declared storage

Ÿ

Use

two

different approaches to

resolve

a system pointer to an e

Ÿ

Assign

a

space pointer to address

a user

space

ŸCall a program and pass three parameters

The overall program flow appears as follows:

CL Pgm CL03

MISRC

CL Pgm

CL04

USRSPC

MI Pgm MICRTPG

CL Pgm

CL05

API

QPRCRTPG

RV3W216-2

Figure 7-1. Program Flow for Creating the MICRTPG Program

7-12System API Programming V4R1

Page 152
Image 152
IBM Version 4 manual Qprcrtpg .API, Program Flow for Creating the Micrtpg Program