Example of Setting a Conditional Job Breakpoint Using F13

In this example you set a conditional job breakpoint using F13 (Work with module breakpoints).

  1. To set a conditional job breakpoint press F13 (Work with module breakpoints). The Work with Module Breakpoints display is shown.
  2. On this display type 1 (Add) on the first line of the list to add a conditional breakpoint.
  3. To set a conditional breakpoint at line 127 when *IN02='1', type 127 for the Line field, *IN02='1' for the Condition field.
  4. If a thread column is shown, before pressing Enter, type *JOB in the thread field.

    Figure 108 shows the Work with Module Breakpoints display after adding the conditional breakpoint.

    Figure 108. Setting a Conditional Job Breakpoint
                              Work with Module Breakpoints
                                                                 System:   TORASD80
     Program  . . . :   DEBUGEX               Library  . . . :   MYLIB
       Module . . . :     DBGEX               Type . . . . . :   *PGM
     Type options, press Enter.
       1=Add   4=Clear
     Opt     Line       Condition
             127     *in02='1'
             88
             102
                                                                             Bottom
     Command
     ===> ________________________________________________________________________
     F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F12=Cancel
     Breakpoint added to line 127. 

    A conditional job breakpoint is set on line 127. The expression is evaluated before the statement is run. If the result is true (in the example, if *IN02='1'), the program stops, and the Display Module Source display is shown. If the result is false, the program continues to run.

    An existing breakpoint is always replaced by a new breakpoint entered at the same location.

  5. After the breakpoint is set, press F12 (Cancel) to leave the Work with Module Breakpoints display. Press F3 (End Program) to leave the ILE source . Your breakpoint is not removed.
  6. Call the program. When a breakpoint is reached, the program stops, and the Display Module Source display is shown again. At this point you can step through the program or resume processing.


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