IBM AS/400 manual Related Information, Using, Crtbndrpg, Strategy 2 ILE Program, Method

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 49
Image 49
ILE Program Using CRTBNDRPG

ILE Program Using CRTBNDRPG

Related Information

Converting

to

RPG

IV

“Converting Your Source” on page 382

One-step

creation

process

Chapter 6, “Creating a Program with the

 

 

 

 

CRTBNDRPG

Command”

on

page 57

ILE static

binding

Chapter 10,

“Calling

Programs and

 

 

 

 

Procedures”

on

page 127;ILE alsoCon-

 

 

 

 

cepts

 

 

 

 

Exception

handling

differences

“Differences between OPM and ILE RPG

 

 

 

 

Exception

Handling”

on page 222

Strategy 2: ILE Program

Using

CRTBNDRPG

 

 

 

 

 

Strategy 2 results in an

ILE program

that

can take advantage of ILE

Your source can contain static procedure

calls because you can bind

other

modules

or

service

programs

using a

binding directory. You can

the activation group in which the

program

will

run.

Method

 

 

 

 

 

 

 

 

Use

the following

general

approach

to

create

such a program:

1.If starting with RPG III source, convert your source to RPG I CVTRPGSRC command.

If converting, be sure to convert all /COPY members and any progra called by the source you are converting. Also, if you are using program, you should also make sure that you are using ILE CL inste CL.

2. Determine the activation group the program will run in.

You may want to name it after the application name, as in this e

3. Identify the names of the binding directories, if any, to be

It

is assumed

with

this approach that if you are using a bindi

one

that

is

already

created

for

you. For

example,

there may b

service

program

that

you

may

want

to

bind

to

your

source. Consequ

you

need to

know is

the

name

of

the

binding

directory.

4. Create an ILE program using CRTBNDRPG, specifying DFTACTGRP(*NO), the activation group on the ACTGRP parameter, and the binding directory, on the BNDDIR parameter.

Note that if ACTGRP(*CALLER) is specified and this program is called by program running in the default activation group, then this program will according to ILE semantics in the areas of override scoping, open s

RCLRSC.

The main drawback of this strategy is that you do not have a perm object that you can later reuse to bind with other modules to cre program. Furthermore, any procedure calls must be to modules or servi grams that are identified in a binding directory. If you want to modules without using a binding directory when you create the progra to use the third strategy.

Chapter 3. Program Creation Strategies25

Page 49
Image 49
IBM AS/400 manual Related Information, Crtbndrpg, Strategy 2 ILE Program, ILE Program Using CRTBNDRPG, Method