Setting and Removing Conditional Job Breakpoints

You can set or remove a conditional job breakpoint by using:

Note:
The relational operators supported for conditional breakpoints are <, >, =, <=, >=, and <> (not equal).

One way you can set or remove conditional job breakpoints is through the Work with Module Breakpoints display. You access the Work with Module Breakpoints display from the Display Module Source display by pressing F13 (Work with module breakpoints). The display provides you with a list of options which allow you to either add or remove conditional and unconditional job breakpoints. An example of the display is shown in Figure 108.

To make the job breakpoint conditional, specify a conditional expression in the Condition field. If the line on which you want to set a job breakpoint is not a runnable statement, the breakpoint will be set at the next runnable statement.

If a thread column is shown, before pressing Enter, type *JOB in the Thread field.

Once you have finished specifying all of the job breakpoints, you call the program. You can use F21 (Command Line) from the Display Module Source display to call the program object from a command line or call the program after exiting from the display.

When a statement with a conditional job breakpoint is reached, the conditional expression associated with the job 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 fields, set more breakpoints, and run any of the debug commands.

An alternate method of setting and removing conditional breakpoints is to use the BREAK and CLEAR debug commands.

To set a conditional breakpoint using the BREAK debug command, type:

BREAK line-number WHEN expression

on the debug command line. The variable 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 relational operators supported for conditional breakpoints are noted at the beginning of this section.

In non-numeric conditional breakpoint expressions, the shorter expression is implicitly padded with blanks before the comparison is made. This implicit padding occurs before any National Language Sort Sequence (NLSS) translation. See National Language Sort Sequence (NLSS) for more information on NLSS.

To remove a conditional breakpoint using the CLEAR debug command, type:

CLEAR line-number

on the debug command line. The variable line-number is the line number in the currently displayed view of the module object from which you want to remove a breakpoint.



[ Top of Page | Previous Page | Next Page | Contents | Index ]