Previous Topic: Conditional BreakpointsNext Topic: Variable-Change Breakpoints


Set Conditional Breakpoints from the Source Listing

To set conditional breakpoints, specify the location and then the condition. Following these steps, specify one or more locations directly from the Source Listing.

  1. Enter c in column 1 of any line in:
  2. Optionally, select Option # 12 Breakpoint Options to set options for your conditional breakpoints.
  3. Press Enter.

Another way of specifying the same condition for multiple locations in your program is to use the ITST menus to specify both the locations and the conditions. For details, see Set Conditional Breakpoints from the Menus later in this chapter.

To set conditional breakpoints that apply to multiple locations in a program, follow these steps:

  1. Enter a c in column 1 of each line in your source code at which you want to set a conditional breakpoint.
  2. Press Enter. CA InterTest for CICS displays the first conditional breakpoint locations screen.
  3. Specify one or more conditional breakpoint locations. CA InterTest for CICS displays a Conditional Breakpoint menu.

The following is a simplified COBOL Conditional Breakpoint entry screen. In this example, the breakpoint takes effect only if the condition If PREV‑ACCT equals NEXT‑ACCT is met. For additional instructions on completing this screen, see Setting and Removing Conditional Breakpoints from the Menus.

          CA-InterTest MONITORING COMMAND BUILDER - CONDITIONAL BREAKPOINT                                                                                        Enter LEFT SIDE                                                                     Data Name TASK-TEXT_______________________________________________________                                                                                                                                                                  Enter OPERATOR (EQ, NE, GT, LT, GE, LE):  eq                                                                                                                    Enter RIGHT SIDE                                                                    Data Name ________________________________________________________________         OR                                                                           Literal C'ACCOUNT NOT FOUND'______________________________________________                                                                                                                                                                                                                                                                                                                                  _ ENTER  S  to drop monitoring on a true condition                                                                                                                                                                                                                                                                                                                                                              Press PF9 to go to complex conditional screen if necessary                      PF1 Help       2            3 End        4 Return     5            6            PF7            8            9 Complex   10           11           12

The For Location field indicates the statement number with the source code at which you specified c on the Source Listing display. Typing an S in the drop monitoring on a true condition field causes monitoring to be dropped for the rest of the current task when the conditional breakpoint is true.

Note: The For Location field does not display when you specify the location using the menus.

Press Enter after completing the Conditional Breakpoint menu. CA InterTest for CICS sets the conditional breakpoints and returns you to the Source Listing display.

Notes:

Set Conditional Breakpoints from the Menus

Conditional breakpoints are set from the same Monitoring submenus used to set monitoring and unconditional breakpoints. Follow the same steps given in Set Conditional Breakpoints from the Menus. However, instead of entering s next to the UBP option, enter s next to the CBP option for conditional breakpoints, as shown in the next screen.

------------- CA InterTest r8.5   PROGRAM MONITORING -------------------  COMMAND ===>                                                                                                                                                        Type information and S to set or R to remove option(s) below.                                                                                                    Program  . .cobdemo_     Program name (or .ALL, .OPTIONS or generic)            user ID  . .barney1_     User (or .ANY) for whom the program is monitored                                                                                                                                                            More:  +    Option      Description                                                       _ Status      Display and/or remove monitoring options (S only)                 _ Monitor     Monitoring (R removes monitoring and all options previously set)  _ UBP         Unconditional breakpoints (specific program only)                 s CBP          Conditional breakpoints (specific program only)                   _ RBP         Breakpoints for CICS, DB2, DL/I or external CALL requests      . . .                                                                                    PF1 Help       2            3 End        4 Return     5            6             PF7 Backward   8 Forward    9           10           11           12

Setting Conditional Breakpoints for COBDEMO, monitored for BARNEY1

First, CA InterTest for CICS displays the Conditional Locations screen shown next.

CA InterTest MONITORING COMMAND BUILDER  COBOL CONDITIONAL LOCATIONS 12                                                                                       SET breakpoint locations for PROG=COBDEMO  in any of the following fields:                                                                                      Para/Data _______________________________     _______________________________       Names: _______________________________     _______________________________              _______________________________     _______________________________    Statement                                                                         Numbers: _____    _____    _____    _____    _____    _____    _____   _____                                                                                     Offsets: _____    _____    _____    _____    _____    _____    _____   _____                                                                     í                       All paragraph names:  _             All instructions: x    After:_                                                                                                Enter 'n' to stop only every n'th time:                        ____              Term ID (or .ANY or .NO) where breakpoints will take effect:   ____              Term ID (or .ANY) that will receive the breakpoints:           ____              Statement no. of indirect command(s) to be executed:                            user ID (or .ANY) who will execute the program:            .BARNEY1                                                                                                                                                                 PF1 Help       2            3 End        4 Return     5            6             PF7            8            9           10           11           12

This screen is similar to the screen used to specify unconditional breakpoints, and you should enter the information in the same way. For details, see Set Unconditional Breakpoints from the Menus later in this chapter.

One special feature lets you set a conditional breakpoint at all instructions. Enter an x in the All Instructions field to request this option, as shown in the previous example. If you request the All Instructions option and set a variable‑change breakpoint, the breakpoint takes effect whenever the value of the variable changes.

After specifying the breakpoint locations, press Enter to display the Conditional Breakpoint screen. On this screen specify the condition that must be satisfied for the breakpoint to take effect.

There are two versions of the Conditional Breakpoint screen: a simplified version for COBOL users, and a detailed version for PL/I and Assembler users and for those COBOL users who prefer this version. Using either version you specify the condition in this format:

left side relational operator right side

If you are a COBOL user, the following screen appears.

 CA InterTest MONITORING COMMAND BUILDER  CONDITIONAL BREAKPOINT       Œ Enter LEFT SIDE                                                                    Data Name  taskswitch________________________________________________                                                                                                                                                                   Enter OPERATOR (EQ, NE, GT, LT, GE, LE):  eq                                                                                                                Enter RIGHT SIDE                                                                   Data Name ____________________________________________________________            OR                                                                   Ž     Literal 3_____________________________________________________________                                                                                             Press PF9 to go to complex conditional screen if necessary                                                                                                                                                                                PF1 Help       2            3 End        4 Return     5            6             PF7            8            9 Complex   10           11           12

Field Œ specifies the left side of the comparison, which is a data name.

Field  specifies the relational operator:

EQ for equal

NE for not equal

GT for greater than

LT for less than

GE for greater than or equal to

LE for less than or equal to

Field Ž specifies the right side of the comparison, which can be a data name, literal or figurative constant.