IBM AS/400 manual Binding Modules into a Program

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 105
Image 105
Binding Modules into a Program

Binding Modules into a Program

Binding Modules into a

Program

 

 

 

 

Binding

is

the

process of

creating

a runnable ILE program by combini

more

modules and optional service programs, and resolving symbols passed

between them.

The

system

code that

does this combining and resolving

binder

on

the

AS/400

system.

 

 

As part of the binding process, a procedure must be identified as

dure, programor entry procedure . When a program is called, the program ent procedure receives the parameters from the command line and is given control for the program. The user's code associated with the progra dure is the user entry procedure.

If an

ILE RPG module contains a main

procedure,

it implicitly also co

program

entry

procedure.

Therefore,

any ILE RPG

module may be speci

entry

module

as long as

it is not a

NOMAIN module.

Figure 40 gives an idea of the internal structure of a program obje program object TRPT, which was created by binding the two modules TR and TRANSSVC. TRANSRPT is the entry module.

Binding Modules into a*PGM ( TRPT)

Program TRANSRPT Module Manual background

Program Entry

Procedure

Main Procedure

Manual background TRANSSVC Module Manual background

Main Source Section

Trans_Inc

Prod_Name

Figure 40. Structure of Program TRPT

Within a bound object, procedures can interrelate using static proce These bound calls are faster than external calls. Therefore, an appl sisting of a single bound program with many bound calls should perform a similar application consisting of separate programs with many externa cation calls.

Chapter 7. Creating a Program with the CRTRPGMOD and CRTPGM Commands81

Page 105
Image 105
IBM AS/400 manual Binding Modules into a Program