You can set or remove a conditional job breakpoint by using:
One way you can set or remove conditional job breakpoints is through the Work with Module Breakpoints display. The Work with Module Breakpoints display can be accessed from the Display Module Source display by pressing F13 (Work with module breakpoints). The Work with Module Breakpoints display is shown in Figure 38.
You can set conditional job breakpoints using the Work with Module Breakpoints display or using the BREAK debug command.
To set a conditional job breakpoint using the Work with Module Breakpoints display:
Figure 38. Setting a Conditional Breakpoint
+--------------------------------------------------------------------------------+ | Work with Module Breakpoints | | System: ISERIES | | Program . . . : TEST Library . . . : TESTLIB | | Module . . . : SAMPMDF Type . . . . . : *PGM | | Type options, press Enter. | | 1=Add 4=Clear | | Opt Line Condition | | 1 35____ I=21________________________ | | _ ______ ____________________________ | +--------------------------------------------------------------------------------+
If the line on which you want to set a breakpoint has multiple statements, the breakpoint is set at the first statement on the line.
Once you have finished specifying all of the breakpoints that you want to set or remove, press F3 (Exit) to return to the Display Module Source display.
Then press F3 (End Program) to leave the Display Module Source display. You can also use F21 (Command Line) from the Display Module Source display to call the program object from a command line.
Run the program object or service program. When a statement with a conditional job breakpoint is reached, the conditional expression associated with the breakpoint is evaluated before the statement is run. If the result is false, the program object continues to run. If the result is true, the program object stops, and the Display Module Source display is shown. At this point, you can evaluate variables, set more breakpoints, and run any of the debug commands.
To set a conditional job breakpoint using the BREAK debug command, type:
BREAK line-number WHEN expression
on the debug command line. line-number is the line number in the currently displayed view of the module object on which you want to set a breakpoint and expression is the conditional expression that is evaluated when the breakpoint is encountered. The conditional expression can only be a simple expression. The term on the right hand side of the equation can only contain a single value. For example, I=21 is accepted but I=A+2 or I=3*2 are not accepted.
If the line on which you want to set a breakpoint has multiple statements, the BREAK debug command will set the breakpoint at the first statement on the line.
For example, to set a conditional job breakpoint at debugger line 35:
You can remove conditional job breakpoints using the Work with Module Breakpoints display or using the CLEAR debug command.
To remove a conditional job breakpoint using the Work with Module Breakpoints Display, type 4 (Clear) in the Opt next to the breakpoint you want to remove, and press Enter. You can also remove unconditional breakpoints in this manner. Figure 38 shows a typical display where 4 (Clear) could be entered in the Opt field.
Repeat the previous steps for each conditional job breakpoint you want to remove.
To remove a conditional job breakpoint using the CLEAR debug command, type:
CLEAR line-number
on the debug command line. line-number is line number in the currently displayed view of the module object from which you want to remove a job breakpoint.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.