IBM AS/400 manual Setting and Removing Unconditional Thread Breakpoints

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 204
Image 204
Figure 81. Setting an Unconditional Job Breakpoint

Setting and Removing Breakpoints

ˆ

 

 

Display Module

Source

 

Program:

DEBUGEX

Library:

MYLIB

Module:

DBGEX

84*---------------------------------------------------------------

85* Move 'a's to the data structure DS2. After the move, the

86* first occurrence of DS2 contains 10 character 'a's.

87*---------------------------------------------------------------

88

C

MOVE

*ALL'a'

DS2

89

 

 

 

 

90*---------------------------------------------------------------

91* Change the occurrence of DS2 to 2 and move 'b's to DS2,

92* making the first 10 bytes 'a's and the second 10 bytes 'b's

93*---------------------------------------------------------------

94

C

2

OCCUR

DS2

 

95

C

 

MOVE

*ALL'b'

DS2

96

 

 

 

 

 

97*---------------------------------------------------------------

98* Fld1a is an overlay field of Fld1. Since Fld1 is initialized

More...

Debug . . . _________________________________________________________________

_______________________________________________________________________________

F3=End program

F6=Add/Clear breakpoint

F10=Step

F11=Display variable

F12=Resume

 

F17=Watch variable

F18=Work with

watch

F24=More keys

Breakpoint

added

to line 88.

 

 

 

 

˜

Figure 81. Setting an Unconditional Job Breakpoint

5. After the breakpoint is set, press F3 (Exit) to leave the Display display. The breakpoint is not removed.

6.Call the program. When a breakpoint is reached, the program stops a Display Module Source display is shown again, with the line containing breakpoint highlighted. At this point you can step through the progr resume processing.

Setting and Removing Unconditional Thread Breakpoints

You can set or remove an unconditional thread breakpoint by using:

¹ The Work with Module Breakpoints display

¹ The TBREAK debug command to set a thread breakpoint in the current

¹ The CLEAR debug command to remove a thread breakpoint

To

set

an

unconditional

thread

breakpoint

using

the

Work

with

Module

Br

display:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

¹

Type

1

 

(Add)

Optin

thefield.

 

 

 

 

 

 

 

 

 

 

 

 

 

¹

In theThread field, type the

thread

identifier.

 

 

 

 

 

¹

Fill

in

 

the

remaining

fields

as

if it

were

an

unconditional

job

brea

¹

Press Enter.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note:

The Thread field

is displayed when

the

DEBUG

option

on

the

SPAWN

 

 

 

 

command

is

greater

than

or

equal

to one.

 

 

 

 

 

 

 

 

The

TBREAK

debug

command

has

the

same

syntax as the BREAK debug

 

 

 

command. Where

the BREAK

debug

command

sets

a

job

breakpoint

at

the

s

 

position

in

 

all

threads,

the

TBREAK

debug

command

sets a

thread breakpo

 

single

thread

the

current

thread.

 

 

 

 

 

 

 

 

 

 

180 ILE RPG for AS/400 Programmer's Guide

Page 204
Image 204
IBM AS/400 manual Setting and Removing Unconditional Thread Breakpoints, Setting and Removing Breakpoints