Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Setting program breakpoints (Code Debug CICS COBOL)


Next, we will set a breakpoint at the beginning of the program so that we can gain control and see the initialized value of WA-HOURS.

Breakpoints are set to halt execution of the program. They are set at any executable verb — to be executed either before or after the statement is executed. There are two types of breakpoints:

  • Unconditional Breakpoints: Halt program execution at the selected statement. Intercepts, described in Intercept Summary (1.7), are a subset of unconditional breakpoints. Runtos are one-time before breakpoints. Setting a runto breakpoint also issues the GO command if a task has been trapped at a break or stop. After the runto breakpoint has been taken, it is deleted.
  • Conditional Breakpoints: Halt program execution only if the specified condition is met.

In this case, we will set an unconditional breakpoint at the beginning of the program.

  1. Type BEFORE 0 in the COMMAND field and press Enter. This sets a breakpoint on the first executable statement in the program. Code Debug CICS displays the message:
    *********************** BEFORE SET ************************
    to indicate a breakpoint has been set.
  2. Type SHOW KEEPS on the COMMAND line and press Enter to see where keeps are set.
    The K indicates that a keep has been set for WA-HOURS.
    Setting Keeps on the Source Listing Screen (2.L)

     ---------------------------------- SOURCE LISTING (2.L) ------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
     MODULE: CWDEMCB2 CSECT: CWDEMCB2          COMPILED: 09 JUN 2005 - 11.23.01
    ------   --------------------------------------------------------------------->
    - - -    -  -  -  -  -  -  -  -  -  -  -  -  -  -  -   90 LINE(S) NOT DISPLAYED
    000085 K                       05  WA-HOURS    PIC 999.
    - - -    -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 2046 LINE(S) NOT DISPLAYED
             **************************** BOTTOM OF DATA **************************
  3. To see where breakpoints have been set, type SHOW BREAKS and press Enter (Setting Breakpoints on the Source Listing Screen (2.L)).

    This screen displays all breakpoints that have been set. The B indicates a before breakpoint has been set on the line.

    Setting Breakpoints on the Source Listing Screen (2.L)

     ------------------------------- SOURCE LISTING (2.L) ---------------------C024
    COMMAND ===>                                                   SCROLL ===> CSR
     MODULE: CWDEMCB2 CSECT: CWDEMCB2          COMPILED: 09 JUN 2005 - 11.23.01
    ------   --------------------------------------------------------------------->
    - - -    -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  406 LINE(S) NOT DISPLAYED
    000358 B                        MOVE '                      00278   ' TO DFHEIV
    - - -    -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 1730 LINE(S) NOT DISPLAYED
             **************************** BOTTOM OF DATA **************************
  4. Type RESET and press Enter to display all lines of the source.

 

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