IBM AS/400 manual Crtbndrpg, Creating, with, Using the CRTBNDRPG Command, Program

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 81
Image 81
Using the CRTBNDRPG Command

Using the CRTBNDRPG Command

Chapter 6. Creating

a

Program

with

the

CRTBNDRPG

Command

 

 

 

 

 

 

 

 

This

chapter

shows

you

how

to create an ILE program using RPG IV s

the

Create

Bound

RPG

Program

(CRTBNDRPG) command. With this command

you

can

create

one

of

two

types of ILE programs:

1.OPM-compatible programs with no static binding

2.Single-module ILE programs with static binding

Whether you obtain a program of the first type or the second typ whether the DFTACTGRP parameter of CRTBNDRPG is set to *YES or *NO respectively.

Creating

a

program

of

the

first type

produces a program that behav

program

in the areas

of open scoping,

override scoping, and RCLRSC. Thi

degree

of

compatibility is

due in part to its running in the same

OPM programs,

namely,

in

the

default activation group.

However, with this high compatibility comes the inability to have sta Static binding refers to the ability to call procedures (in other m programs) and to use procedure pointers. The inability to have stati that you cannot:

¹ Use the CALLB operation in your source

¹ Call a prototyped procedure

¹Bind to other modules during program creation

Creating

a program of the second

type produces a program

with

ILE

such

as

static binding.

You

can

specify at program-creation

time

the

group the program is

to

run

in,

and any modules for static

binding.

can

call

procedures

from

your source.

 

 

Using the CRTBNDRPG

Command

 

 

 

 

 

 

 

 

 

 

 

The

Create

Bound

RPG

(CRTBNDRPG)

command

creates a program object from

RPG

IV source in one step. It also

allows

you to bind in

other

mo

programs

using a

binding

directory.

 

 

 

 

The

command

starts

the

ILE RPG

compiler

and creates a temporary modu

in

the

library

QTEMP. It

then

binds it

into

a program object

of

typ

program object is created, the temporary module used to create th deleted.

The CRTBNDRPG command is useful when you want to create a program obj from standalone source code (code that does not require modules to

together),

because

it

combines the steps of

creating and

binding.

F

allows

you

to create an OPM-compatible

program.

 

 

 

 

 

Note:

If

you

want

to

keep

the

module

object

in

order

to

bind it

 

 

into

a

program

object,

you

must

create

the

module

using the

CR

Copyright IBM Corp. 1994, 1999

57

Page 81
Image 81
IBM AS/400 manual Crtbndrpg, Creating, with, Using the CRTBNDRPG Command, Program