You can set unconditional breakpoints directly on the Source Listing screen just as easily as you displayed and modified TASKNUM. Type u to the left of each statement where you want CA InterTest to halt program execution. Here is how to set a breakpoint at the following IF statement:
IF TASKNUM GREATER 2
CA InterTest for CICS V9.1 - PROTSYM FILE ABEND DETECTED BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ TASKNUM | 00000. ---------+--------------------------------------------------------------------- _ 000477 CONTINUE-TASK. 000478**** TASKNUM *NOTE* FIELD MUST BE INITIALIZED A ==> ADD +1 TO TASKNUM. _ 000480 IF TASKNUM = 1 _ 000481 MOVE 'DMAPASR' TO MAPNAME. _ 000482 IF TASKNUM = 2 _ 000483 MOVE 'DMAPSUM' TO MAPNAME. u 000484 IF TASKNUM GREATER 2 . .
CA InterTest for CICS resumes program execution and continues until it reaches the breakpoint you just set. CA InterTest halts the program before that statement is executed and displays the screen shown next.
CA InterTest for CICS V9.1 - PROTSYM FILE UNCOND BEFORE BREAKPOINT COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ TASKNUM | +00001. ---------+--------------------------------------------------------------------- _ 000482 IF TASKNUM = 2 _ 000483 MOVE 'DMAPSUM' TO MAPNAME. U ==> IF TASKNUM GREATER 2 _ 000485 GO TO SEND-END-MSG. . . .
Notice the U to the left of the highlighted statement. It identifies the breakpoint as an Unconditional breakpoint. For an Automatic, Conditional, Variable‑Change, or Request breakpoint, CA InterTest displays an A, C, V, or R, respectively.
Note: The value of TASKNUM is now 1 because the ADD +1 TO TASKNUM statement executed successfully.
When you are stopped at a breakpoint, you can do the following tasks:
When debugging your own programs, you will typically perform one or more of these activities, which are described in detail in the next chapter. However, COBDEMO does not have any more errors, so we are going to complete the demo session.
As you continue testing and debugging, you should clean up by removing any breakpoints no longer needed, so that when retesting the program it will not stop unnecessarily. Next, remove the unconditional breakpoint you just set so COBDEMO will not stop at this statement when it is re-executed.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|