In this example, you watch a variable kount in program MYLIB/PAYROLL. To set the watch condition, type:
WATCH kount
on a debug line, accepting the default value for the watch-length.
If the value of the variable kount changes subsequently, the application stops and the Display Module Source display is shown, as illustrated in Figure 42.
Display Module Source
Program: PAYROLL Library: MYLIB Module: PAYROLL
42 * THE FOLLOWING 3 PARAGRAPHS CREATE INTERNALLY THE *
43 * RECORDS TO BE CONTAINED IN THE FILE, WRITES THEM *
44 * ON THE DISK, AND DISPLAYS THEM *
45 *****************************************************
46 STEP-2.
47 ADD 1 TO KOUNT, NUMBR.
48 MOVE ALPHA (KOUNT) TO NAME-FIELD.
49 MOVE DEPEND (KOUNT) TO NO-OF-DEPENDENTS.
50 MOVE NUMBR TO RECORD-NO.
51 STEP-3.
52 DISPLAY WORK-RECORD.
53 WRITE RECORD-1 FROM WORK-RECORD.
54 STEP-4.
55 PERFORM STEP-2 THRU STEP-3 UNTIL KOUNT IS =
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
Watch number 1 at line 55, variable: KOUNTThe following programs cannot be added to the ILE debug environment:
In the first two cases, the stopped statement number is passed. In the third case, the stopped MI instruction is passed. The information is displayed at the bottom of a blank Display Module Source display as shown below. Instead of the line number, the statement or the instruction number is given.
Display Module Source
Program: PAYROLL Library: MYLIB Module: PAYROLL
(Source not available.)
Bottom
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
Watch number 1 at instruction 18, variable: KOUNT(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.