When Conditions and Conditional Breakpoints


When Conditions

Unlike conditional breakpoints, When conditions are not associated with a particular source line. Source statements are executed one at a time. Every defined When condition expression is evaluated after each executed source statement. While multiple When conditions can be active simultaneously, they are evaluated in the order in which they were defined. After a defined When the condition is satisfied (evaluates to true), program execution halts, positioned at the last executed source statement.

To create When conditions

  1. Do one of the following:
    • From the ruler area of the source, right-click and select Set When Condition. The When Condition dialog box appears.
    • Right-click in the Editor and select Set When Condition. The When Condition dialog box appears.
  2. Enter a When condition expression.
  3. Click OK. The When condition appears in the Breakpoints view and is evaluated when execution resumes.

Note

All When conditions are examined individually after each executable statement. This can impose a substantial load on available processor resources.

When Condition Syntax

In its most basic form, a When condition consists of a variable and the keyword CHANGES. Another simple form consists of a variable, an operator, and a comparison value. The following table describes the basic set of operators common to both Code Debug TSO and IMS and Code Debug CICS.

Operator

Meaning

<

Less than

=

Equal to

>

Greater than

NOT

Logical negation

CHANGES

Variable value changes

For a comprehensive list of operators supported by each product's debuggers see each product's respective user documentation.

Conditional Breakpoints

Conditional breakpoints are breakpoints that only stop execution once a specified condition is met. Upon encountering a source line designated with a conditional breakpoint, Xpediter/Eclipse evaluates whether the associated condition is true. If true, the breakpoint is honored and execution stops at that source line. If false, the breakpoint is ignored and execution continues.

To create Conditional breakpoints

  1. Do one of the following:
    • From the ruler area of the source, right-click and select Set Conditional Breakpoint. The Conditional Breakpoint dialog box appears.
    • Right-click in the Editor and select Set Conditional Breakpoint. The Conditional Breakpoint dialog box appears.
    • Right-click an existing before breakpoint in the Breakpoints view and select Breakpoint Properties. The Conditional Breakpoint dialog box appears.
  2. Enter the condition to be evaluated.
  3. Click OK. The condition appears in the Breakpoints view. If you modified an existing before breakpoint, the breakpoint is modified as specified to have the condition associated with it.

To disable or remove Conditional breakpoints

In the Breakpoints view, select the breakpoint and click icon_remove_selected_breakpoint.gif.

Conditional Breakpoint Syntax

The rules for syntax are exactly the same as described in either the Code Debug CICS or Code Debug TSO and Code Debug IMS User Guide. In its simplest form, syntax follows the format of [variable] [condition] [value].

Related Topics

Skippoint

Set-Line-as-Next-Statement



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*