IBM AS/400 manual Additional Examples, Modules, Related CL Commands, Behavior of Bound ILE

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 104
Image 104
Additional Examples

Creating a Module Object

A*****************************************************************

A* RELATED FILES:

TRNSRPT

 

*

A*

DESCRIPTION:

This is

the physical file TRNSDTA. It has

*

A*

 

one record format called TRNSREC.

*

A*****************************************************************

A* PARTS TRANSACTION FILE -- TRNSDTA

AR TRNSREC

A

PROD

10S

0

TEXT('Product')

A

QTY

5S

0

TEXT('Quantity')

A

DISCOUNT

2S

2

TEXT('Discount')

 

 

 

 

 

Figure 39.

DDS for TRNSDTA

 

 

 

Additional Examples

For additional examples of creating modules, see:

¹

“Sample

Service

Program”

on page 94, for an example of creating a mod

 

for

a

service program.

¹

“Binding

to

a

Program” on page 98. for an example of creating a modu

 

used

with

a

service

program.

¹“Managing Your Own Heap Using ILE Bindable APIs” on page 119, for a example of creating a module for dynamically allocating storage for array

¹ “Sample Source for

Debug Examples” on

page 211, for example of crea

RPG and C module

for use in a sample

debug program.

Behavior of Bound ILE

RPG

Modules

 

 

 

 

 

In

ILE

RPG, mainthe procedureis

the boundary

for

the scope

of LR

semantic

the

RPG

cycle.moduleThe is the

boundary for

the

scope of

open

files.

In any ILE program, there may be several RPG cycles active; there i cycle for each RPG module that has a main procedure. The cycles are independent: setting on LR in one main procedure has no effect on the another.

Related CL Commands

The following CL commands can be used with modules:

¹ Display Module (DSPMOD)

¹ Change Module (CHGMOD)

¹ Delete Module (DLTMOD)

¹Work with Modules (WRKMOD)

For further information on these commandsCL Referencesee the (Abridged).

80 ILE RPG for AS/400 Programmer's Guide

Page 104
Image 104
IBM AS/400 manual Additional Examples, Modules, Related CL Commands, Behavior of Bound ILE, Creating a Module Object