IBM AS/400 manual Creating a Module for, Creating a Module Object, Debugging

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 102
Image 102

Creating a Module Object

 

* Prototype for Trans_Inc

 

 

 

D

Trans_Inc

PR

11P

2

 

D

Prod

 

10P

0

VALUE

D

Quantity

 

5P

0

VALUE

D

Discount

 

2P

2

VALUE

 

* Prototype for Prod_Name

 

 

 

D

Prod_Name

PR

40A

 

 

D

Prod

 

10P

0

VALUE

 

 

 

Figure

37. Source for TRANSP /COPY member

 

Creating a Module for

Source

Debugging

 

 

 

 

 

 

 

In

this

example,

you

create

an ILE RPG module object

that

you

can

d

the

source debugger. The module TRANSRPT contains a main

procedure which

drives the report processing. It calls the procedures

in TRANSSVC

to

pe

certain

required

tasks. The

source for this module is

shown

in

Figure

page 79.

 

 

 

 

 

 

 

 

To

create a module

object,

type:

 

 

 

 

CRTRPGMOD MODULE(MYLIB/TRANSRPT) SRCFILE(MYLIB/QRPGLESRC)

DBGVIEW(*SOURCE)

The module

is created

in

the

library

MYLIB with

the same name as th

on which it is based,

namely,

TRANSRPT.

This

module

object

can be

debu

using a source view. For information on

the

other

views

available,

see

Program for

Debugging”

on

page 166.

 

 

 

 

 

A compiler listing for the TRANSRPT module will be produced.

78 ILE RPG for AS/400 Programmer's Guide

Page 102
Image 102
IBM AS/400 manual Creating a Module for, Creating a Module Object, Debugging