IBM AS/400 manual Using a Compiler Listing for, Maintenance

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 93
Image 93

Using a Compiler Listing

Coordinating Listing Options with Debug View Options

Correcting run-time errors often involves debugging a program. The follow siderations may help you when you go to debug your program:

¹If you use the source debugger to debug your program you hav

debug views: *STMT, *SOURCE, *LIST, *COPY, *ALL.

¹If you plan to use a compiler listing as an aid while debugging,

 

obtain

one

by specifying OUTPUT(*PRINT). A listing

is important if

 

to debug

using a

statement (*STMT) view since the

statement numbers

setting breakpoints are those identified in the

source

listing. T

numbers are listed in the column labeled as the Line Number when

OPTION(*NOSRCSTMT) is

specified, and in the column labeled as

the Sta

ment

Number

when

OPTION(*SRCSTMT) is specified.

 

 

¹If you know that you will have considerable debugging to do, you compile the source with DBGVIEW(*ALL), OUTPUT(*PRINT) and OPTION(*SHOWCPY). This will allow you to use either a source or listi

view, and it will include /COPY members.

¹ If

you specify DBGVIEW(*LIST), the information available to you

wh

ging

depends

on what you specified for the OPTION parameter.

The

include /COPY members and externally described files only if you

OPTION(*SHOWCPY

*EXPDDS) — these are the defaults.

 

Using a Compiler Listing for

Maintenance

 

A

compiler

listing

of an

error-free program can be used as documenta

¹

Teaching

the

program

to a new programmer.

¹ Updating the program at a later date.

In either case it is advisable to have a full listing, namely, one OUTPUT(*PRINT) and with OPTION(*XREF *SHOWCPY *EXPDDS *EXT

*SHOWSKP).

Note:

Except

for

*SHOWSKP, this is the default

setting for

each of

t

 

ters on both create commands.

 

 

 

Of

particular value for program maintenance is

the Prologue

section

of

This

section

tells

you:

 

 

 

¹ Who compiled the module/program

¹ What source was used to produce the module/program

¹ What options were used when compiling the module/program

You may need to know about the command options (for example, the de selected, or the binding directory used) when you make later change program.

The

following specifications for the OPTION parameter provide addition

tion

as indicated:

¹*SHOWCPY and *EXPDDS provide a complete description of the program, including all specifications from /COPY members, and generated speci from externally described files.

Chapter 6. Creating a Program with the CRTBNDRPG Command69

Page 93
Image 93
IBM AS/400 manual Using a Compiler Listing for, Maintenance, Coordinating Listing Options with Debug View Options