Previous Topic: Use Variable-Change Breakpoints to Detect Changing ValuesNext Topic: Remove a Variable-Change Breakpoint


Set a Variable-Change Breakpoint

A quick way to set a variable-change breakpoint is from the point in the listing where it is defined. In the following example, you will set a variable-change breakpoint on TSQ-TERMID.

To set a variable-change breakpoint

  1. Position the listing at the definition for TSQ-TERMID by typing L TSQ-TERMID in the Command line field, and press Enter.

    CA InterTest for CICS V9.1 - PROTSYM FILE SOURCE LISTING DISPLAY COMMAND ===> L TSQ-TERMID Program= COBDEMO Option # Stmt # Margin= 01 Search= OPTS 1 Proc div 2 Work-stor 3 Link sect 4 D-map 5 Clst/Pmap More: + 6 Data xref 7 Proc xref 8 Err msgs 9 Srch fwd 10 Srch bwd PFKS 1 Help 2 3 End 4 Profile 5 Monitor 6 Menu 7 Backward 8 Forward 9 10 11 12 Status ------------------------------------------------------------------------------- YEARWINDOW(1900) ZWB 000001 ID DIVISION. 000002 PROGRAM-ID. COBDEMO. 000003 ENVIRONMENT DIVISION. 000004 DATA DIVISION. _ 000005 WORKING-STORAGE SECTION. . . .

  2. The listing is then positioned at the definition for the TSQ-TERMID. Type v to the left of the statement defining the TSQ-TERMID field, position the cursor on the TSQ-TERMID field, and press Enter.

    CA InterTest for CICS V9.1 - PROTSYM FILE SOURCE LISTING DISPLAY COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= OPTS 1 Proc div 2 Work-stor 3 Link sect 4 D-map 5 Clst/Pmap More: + 6 Data xref 7 Proc xref 8 Err msgs 9 Srch fwd 10 Srch bwd PFKS 1 Help 2 3 End 4 Profile 5 Monitor 6 Menu 7 Backward 8 Forward 9 10 11 12 Status ------------------------------------------------------------------------------- _ 000027 01 TSQ-NAME. _ 000028 03 TSQ-TRANID PIC XXXX. v 000029 03 TSQ-TERMID PIC XXXX. _ 000030 01 TASK-STRUCTURE. _ 000031 03 TASK-CNTL PIC X(4) VALUE 'CNTL'. _ 000032 03 TASK-PROTCPF PIC X(8) VALUE 'PROTCPF'. _ 000033 03 TASK-PROTHLF PIC X(8) VALUE 'PROTHLF'. _ 000034 03 TASK-SWITCH PIC X. .

  3. Type the DEMC transaction. The following breakpoint displays:Type the DEMC transaction. The following breakpoint displays:

    CA InterTest for CICS V9.1 - PROTSYM FILE COND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= -- More: + ----------------------------------- PFKS 19 Backward 20 Forward - _____ DMAP04AI | ..................................... _____ DMAPBEGI | ............ _____ DMAPASRI | ............ _____ DMAPSUMI | ............ _____ DMAPENDI | ..................................... _____ DMAP00I | ..................................... ---------+-------------------------------------------------------------------- _ 000353 MOVE EIBTRMID TO TSQ-TERMID. 000354*** THIS CODE INITIALIZES THE MAPS BECAUSE COBOL2 DOESN'T *** V ==> MOVE LOW-VALUES TO DMAP04AI ==> ==> CAIN3630 Conditional breakpoint requested at offset .ANY ==> IF='TSQ-TERMID'.NE.'TSQ-TERMID' ==> _ 000356 DMAPBEGI _ 000357 DMAPASRI _ 000358 DMAPSUMI _ 000359 DMAPENDI _ 000360 DMAP00I

    Note: the listing is positioned on the statement following that which actually changed TSQ-TERMID, because the field is examined at the beginning of each new COBOL statement.

    The listing is positioned on the statement following that which actually changed TSQ-TERMID, because the field is examined at the beginning of each new COBOL statement.

    A variable-change-breakpoint may be set any time during execution, or from a listing of your program before execution begins. You may find it useful to also set a static keep on the field which you are interested in watching for a change. In this way you will be able see how it changed automatically each time a variable change breakpoint occurs.

    Each variable change breakpoint is identified by the abbreviation VBP on the Status Report and Monitoring Status display.

    Variable-change breakpoints are actually a special type of conditional breakpoint. CA InterTest for CICS checks for the condition at any statement, as shown in the following example:

    IF 'data-item'.NE.data-item'
    

    which means:

    IF data-item (current) NOT EQUAL TO data-item (value when breakpoint set)
    

    To explore additional ways to set and use conditional breakpoints, see the later chapters in this primer.