-------------------------------------------------------------------------
      001054       *
U---> 001055        PAY-CALC.
 ---> 001056            PERFORM POPULATE-GRAPH THRU POPULATE-GRAPH-EX
      001057                VARYING SUB-4 FROM 1 BY 1
      001058                    UNTIL SUB-4 GREATER THAN NO-OF-HOURS.
 ---> 001059        PAY-CALC-EX.
 ---> 001060            MOVE SPACES      TO CHEQUE-LINE.
 ---> 001061            MOVE TOTAL-GROSS TO CHEQUE-AMOUNT.
 ---> 001062        PAY-RETURN.
 ---> 001063            GO TO OPTIONS.
      001064       *
 ---> 001065        POPULATE-GRAPH.
 ---> 001066            MOVE MONTH-ITEM(SUB-4)     TO X-AXIS-YTD.
 ---> 001067            MOVE TOKEN-ITEM            TO X-AXIS-R(SUB-4).
 ---> 001068            ADD  MONTHLY-AMOUNT(SUB-4) TO YTD.
 ---> 001069            MOVE YTD                   TO TOTAL-GROSS.
Issue the SLOW command to execute one verb every 2 seconds. As the program resumes execution, you are able to see
the changing values of YTD and X-AXIS. In this demo, you are going to halt execution when the X-AXIS value is MAR by
pressing the ATTENTION key.
Type the following command: slow 2 and press Enter.
The application initiates a time-controlled execution of CAMRCOB2, at a rate of one verb every 2 seconds.


When the value of X-AXIS in the keep window is MAR, press the ATTN or PA1 key. Try the ATTN key first. The Attention
Intercept panel displays, as shown in the following panel.
A sample Attention Intercept panel follows:
 579


InterTest™ and SymDump ® 11.0
CAMRCOB2 ---------- CA InterTest Batch ATTENTION Intercept -------------------
COMMAND ===>                                                  SCROLL ===> CUR
TRACE=> 001069 001068 001067 001066 001065 001071 001070 001069 001068 001067 0
      -------------------------------------------------------------------------
      1F08CB11 ND-OT 000683 03 YTD                          +0255273.52
      1F08C8E0 AN    000553 05 X-AXIS                       Mar ->->->
      -------------------------------------------------------------------------
      001054       *
U0001 001055        PAY-CALC.
 0001 001056            PERFORM POPULATE-GRAPH THRU POPULATE-GRAPH-EX
      001057                VARYING SUB-4 FROM 1 BY 1
      001058                    UNTIL SUB-4 GREATER THAN NO-OF-HOURS.
 ---> 001059        PAY-CALC-EX.
 ---> 001060            MOVE SPACES      TO CHEQUE-LINE.
 ---> 001061            MOVE TOTAL-GROSS TO CHEQUE-AMOUNT.
 ---> 001062        PAY-RETURN.
 ---> 001063            GO TO OPTIONS.
      001064       *
 0003 001065        POPULATE-GRAPH.
 0003 001066            MOVE MONTH-ITEM(SUB-4)     TO X-AXIS-YTD.
 0003 001067            MOVE TOKEN-ITEM            TO X-AXIS-R(SUB-4).
 0003 001068            ADD  MONTHLY-AMOUNT(SUB-4) TO YTD.


0002 001069            MOVE YTD                   TO TOTAL-GROSS.
 0002 001070        POPULATE-GRAPH-EX.
Review what you just did.
•You opened a keep window for two variables whose values you wished to view and compare.
•You used the command slow 2 to have the application slowly execute the program. However, during the program
execution, you could monitor the values of the variables in the keep window.
•You used the ATTENTION or PA1 key to stop program execution, and the Attention Intercept panel displays.
This combination of using keep windows, the slow command, and an Attention Intercept allows you to carefully control
and monitor your program execution, while tracking the values of specific variables.
NOTE
The Attention Intercept panel is only displayed when you press the ATTN or PA1 key after which the application
executes a statement in a program that is being monitored.
Remove the Keep Window
Before returning to the Options Menu of the advanced demo, remove the keep window.
Type the following command: remove all and press Enter.
The application removes the keep window for YTD and X-AXIS on the Attention Intercept panel.
Continue Execution
Type GO and press Enter to continue execution. CAMRCOB2 resumes execution, and displays the Options Menu.
This concludes Option 1: Time Controlled Execution. Select another option and go to the appropriate section in this article,
or exit the demo using PF3.
 580


InterTest™ and SymDump ® 11.0
Option 2 Set Conditional Breakpoints
This option shows you how to set and use conditional breakpoints.
NOTE
Before you proceed, complete the steps that are outlined in Advance Demo Preliminaries, and have the Demo
Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 2 and press Enter.
CAMRCOB2 displays the screen that describes what occurs in this part of the demo session.
2.Press  Enter. The application halts CAMRCOB2 at an unconditional breakpoint. The first executable statement in the
paragraph is highlighted.
3.Access the screen used to set conditional breakpoints. From this screen, you can set both the conditions and any
commands you want executed when the specified condition is met.
4.Type the COND command and press Enter.
The application displays the When panel. WHEN is a synonym for COND.
5.Make the entries on the When panel and Press Enter.
The application displays the following message in the top-right corner of the When panel: WHEN CONDITION SET.
----------------------- CA InterTest Batch WHEN PANEL -------------------------
OPTION ===>S

   S - SET A WHEN CONDITION
   R - RESET A WHEN CONDITION
   L - OR BLANK, LIST THE WHEN CONDITIONS

SPECIFY DATA AREA NAME(S) AND COMPARISON CONDITION:
   WHEN-NAME    ===> ytdcond
   DATA-AREA-1  ===> sub-total
   OPERATOR     ===> ge       (EQ, NE, LT, GT, LE, GE, =, <>, <, >, <=, >=)
   DATA-AREA-2  ===> 600.00
   AFTER        ===> N         (Y/N)

COMMANDS TO BE EXECUTED AT WHEN CONDITION:


COMMANDS TO BE EXECUTED AT WHEN CONDITION:
===>  k sub-total; set total-gross=2000; k total-gross
6.Press PF3 to exit the When panel. The application brings you to the previous Breakpoint Intercept panel.
7.Continue execution by typing GO and pressing Enter. CAMRCOB2 resumes execution until the condition that you set
for the YTDCOND breakpoint is met. When the value of SUB-TOTAL is greater than or equal to 600, the application
halts execution, and executes the commands that you entered for the conditional breakpoint. The application displays
a keep window for SUB-TOTAL, sets TOTAL-GROSS to 2000, and then displays TOTAL-GROSS in the keep window.
Your screen should look like the Intercept panel in the following panel.
CAMRCOB2 ---------- CA InterTest Batch WHEN YTDCOND BEFORE Intercept ---------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001102 001101 001100 001104 001103 001102 001101 001100 001104 001103
       ------------------------------------------------------------------------
       1F08CAFC ND-OT 000679 03 SUB-TOTAL                    +0000971.68
       1F08CB08 ND-OT 000682 03 TOTAL-GROSS                  +0002000.00
       ------------------------------------------------------------------------
  0003 001101            ADD BILLING-AMOUNT(SUB-7) TO SUB-TOTAL.
  0002 001102            MOVE SUB-TOTAL            TO BILL-YTD.
 581


InterTest™ and SymDump ® 11.0
  0002 001103        BILL-CALC-EX.
  0002 001104            EXIT.
       001105
       001106
  ---> 001107        DEMONSTRATE-SPLIT-SCREEN.
       001108       * -----------------------------------------------*
       001109       *    This section of the Demo shows you how to   *
       001110       *    SPLIT the screen .. ..                      *
       001111       * -----------------------------------------------*
  ---> 001112            CALL 'ISPLINK' USING DSPLY,
       001113                                 COBDPN73.
  ---> 001114            MOVE  4        TO    COBDPN71-LENGTHS.
  ---> 001115            CALL 'ISPLINK' USING VCOPY,
       001116                                 VCOPY-COBDPN71,
A sample Intercept panel showing condition YTDCOND has been met follows:
Now remove the conditional breakpoint before continuing.
Follow these steps:
1.Using the WHEN command to return to the When panel.
The When panel displays.
2.Type the following values on the When panel and press Enter:
OPTION: ===> r
WHEN NAME ===> ytdcond
The application displays the following message in the top-right corner of the When panel: WHEN DELETED.
3.Press PF3 to exit the When panel. The application brings you to the previous Intercept panel.
Remove the Keep Window and Continue Execution
Remove the keep window before continuing execution.
Follow these steps:
1.Type the REMOVE ALL command and Press Enter.
The keep window is removed.
2.Type GO and press Enter. CAMRCOB2 resumes execution and displays the Options Menu.


2.Type GO and press Enter. CAMRCOB2 resumes execution and displays the Options Menu.
This concludes Option 2: Conditional Breakpoints. Select another option and go to the appropriate section, or exit the
demo using PF3.
Option 3 Update Source Code
This option illustrates how you can use the ISPF or Roscoe  split-screen capability from any screen. One way to use this
feature is to update your source code when you find errors during your test session.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminaries, and have the Demo
Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 3 and press Enter.
CAMRCOB2 displays the screen that describes what occurs in this part of the demo session.
2.Press Enter. The application halts CAMRCOB2 at an unconditional breakpoint at the paragraph SPLIT-SCREEN.
3.ISPF users: Tab about halfway down your screen and press the SPLIT PF key that is defined in your ISPF profile
(normally PF2).
 582


InterTest™ and SymDump ® 11.0
The ISPF Primary Option Menu displays in the bottom half of your screen.
Roscoe  users: Enter the Roscoe  SPLIT sequence.
A second Roscoe  panel displays.
A sample showing using a split-screen from an Intercept Panel (ISPF Users) follows:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001123 001121 001115 001114 001112 001107 001021 001020 001018 001016
  ---> 001122               GO TO OPTIONS.
 U---> 001123        SPLIT-SCREEN.
  ---> 001124            MOVE  R1498-TIMEO TO R1498-TIME.
  ---> 001125            GO TO OPTIONS.
       001126       * -----------------------------------------------*
       001127       * From this Unconditional Breakpoint you can     *
       001128       * press the PF key assigned to the SPLIT command *
       001129       * which takes you to the ISPF Main Menu.         *
       001130       * -----------------------------------------------*
       001131
       001132
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
-----------------------  ISPF/PDF PRIMARY OPTION MENU     ISPF HELP - 461-1005
-----------------------       VERSION 3 RELEASE 1         --------------------
OPTION  ===>
                                                            USERID   - PHUMPHR


OPTION  ===>
                                                            USERID   - PHUMPHR
   0  ISPF PARMS  - Specify terminal and user parameters    TIME     - 14:37
   1  BROWSE      - Display source data or output listings  TERMINAL - 3278
   2  EDIT        - Create or change source data            PF KEYS  - 24
   3  UTILITIES   - Perform utility functions               DATE(G)  - 14/12/18
   4  FOREGROUND  - Invoke lang. processors in foreground   DATE(J)  - 14.352
   5  BATCH       - Submit job for language processing
   6  COMMAND     - Enter TSO command or CLIST
   7  DIALOG TEST - Perform dialog testing
Update Your Source Code
If you found an error in your program code, use the ISPF menu or Roscoe  to access and edit your source code before
continuing with your test session.
For example, in the basic demo, the application stopped execution of the program because it detected an S0C7 ABEND.
You were able to continue execution by dynamically changing the value of Tasknum to zero. This was a one-time patch.
To correct the problem, update your source code so that Tasknum is properly initialized. You can do this from any
Intercept panel by splitting your screen to edit your source code.
Continue Execution
Follow these steps:
1.ISPF users: Remove your ISPF split-screen using the command: =X
Roscoe  users: Use the Roscoe  END key to end the second session.
You return to a full-screen display of the Unconditional Breakpoint shown in the previous panel.
2.Type GO and press Enter to continue execution. You return to the Demo Options Menu.
 583


InterTest™ and SymDump ® 11.0
This concludes Option 3: Update Source Code. Select another option and go to the appropriate section, or exit the demo
using PF3.
Option 4 Interrupt a Looping Program
This option illustrates how to interrupt and verify that you have a looping program. The option also illustrates the use of the
skip command.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminaries, and have the Demo
Session Options Menu that is displayed on your screen.
This option requires you to interrupt the program by pressing the ATTENTION key or the PA1 key. Before you proceed,
locate each of these keys on your keyboard. If you need help, ask a technical support person before you begin.
Follow these steps:
1.Key in Option 4. Press Enter.CAMRCOB2 displays the screen that describes what occurs in this part of the demo
session.
2.Press Enter. The application halts CAMRCOB2 at an unconditional breakpoint set at ORDER-CALC. A sample screen
showing the CAMRCOB2 stopped at ORDER-CALC follows:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001232 001225 001219 001218 001216 001210 001023 001022 001020 001018
       001231       * -----------------------------------------------*
 U---> 001232        ORDER-CALC.
  ---> 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  ---> 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  ---> 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX


---> 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  ---> 001239        TOTAL-ORDER.
  ---> 001240            ADD 1 TO SUB-6.
  ---> 001241            ADD 1 TO LOOP-OUT.
  ---> 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  ---> 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
  ---> 001245            MOVE 1 TO SUB-6.
  ---> 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
       001248       * The code above will loop. The loop can be      *
NOTE
If the Frequency Counter arrows and numbers are not displayed along the left side of your screen, turn on
the frequency display by entering the command: freq.
3.Continue execution by typing GO and pressing Enter. CAMRCOB2 resumes execution. Note that the system light
remains on. There are other breakpoints, and screen panels in the demo program code, yet all you see is the system
light. This behavior is symptomatic of a looping program.
4.Halt the program to see what is going on. Press the ATTN or PA1 key. Try the ATTN key first. If that does not work,
your testing environment requires you to use the PA1 key. Press RESET before pressing the PA1 key to unlock the
terminal keyboard. The Attention Intercept panel displays.


terminal keyboard. The Attention Intercept panel displays.
Continue with the Continuing from the Attention Routine section.
 584


InterTest™ and SymDump ® 11.0
NOTE
If you do not successfully stop execution with the ATTN or PA1 key before 5000 executions of the demo
program loop, you reach a safety net conditional breakpoint. If you reach this breakpoint, follow the instructions
in the next session to continue.
Continue from the “Safety Net” Conditional Breakpoint
Follow this section only if you see the breakpoint in the following panel. If you do not, continue with Continuing from the
Attention Routine.
A sample screen showing a Safety Net Conditional Breakpoint of a Demo Loop follows:
CAMRCOB2 ---------- CA InterTest Batch WHEN LOOPCOND BEFORE Inter- SET COMPLETE
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001242 001241 001240 001239 001253 001246 001245 001244 001242 001241
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  5001 001239        TOTAL-ORDER.
  5001 001240            ADD 1 TO SUB-6.
  5001 001241            ADD 1 TO LOOP-OUT.


5001 001241            ADD 1 TO LOOP-OUT.
  5000 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  5000 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
  5000 001245            MOVE 1 TO SUB-6.
  5000 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
To continue with the looping program demo, you must press the ATTN or PA1 key before 5000 executions of the loop this
time. To continue the program loop, use the following steps:
1.Type G to the left of the line:
MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-0
2.Press Enter to continue the loop execution.
3.Press the ATTN key or the RESET, then PA1 keys. Try the ATTN key first. If that does not work, your testing
environment requires you to use the PA1 key.
NOTE
Even if PA1 stopped the slow execution in option 1, you might need to press ATTN to stop a loop.
You should see the Attention Intercept panel.
To return to the Options Menu:
1.Enter the command: go options
2.Press Enter.
You return to the Options Menu. You can try the same option again, even if you did not complete it the first time, or
select another option from the menu.
 585


InterTest™ and SymDump ® 11.0
Continue from the Attention Routine
The Attention Intercept panel displays. A sample showing an Attention Intercept in TOTAL-ORDER Routine follows:
CAMRCOB2 ----------- CA InterTest Batch ATTENTION INTERCEPT -------------------
COMMAND ===>                                                  SCROLL ===> PAGE
TRACE=> 001244 001243 001242 001241 001255 001248 001247 001246 001244 001243 0
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  1926 001239        TOTAL-ORDER.
  1926 001240            ADD 1 TO SUB-6.
  1926 001241            ADD 1 TO LOOP-OUT.
  1925 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  1925 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
  1925 001245            MOVE 1 TO SUB-6.
  1925 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*


001247       *------------------------------------------------*
CAMRCOB2 never left the TOTAL-ORDER routine, as you can see from your Attention Intercept screen display. The
current statement is highlighted.
Look at the frequency counters to the left of the program statements. The counters show repeated execution of the
TOTAL-ORDER statements, indicating a loop. To investigate the logic in TOTAL-ORDER, you can set a keep window for
SUB-6 and then execute slowly using the SLOW command. This time, use the abbreviated form of the keep command: k.
Follow these steps:
1.Type the following command to set the keep window: k sub-6 and press Enter.
The application displays a keep window for the variable SUB-6.A sample screen showing the keep window to view
SUB-6 follows:
CAMRCOB2 ----------- CA InterTest Batch ATTENTION INTERCEPT ------------------
COMMAND ===>                                                  SCROLL ===> PAGE
TRACE=> 001244 001243 001242 001241 001255 001248 001247 001246 001244 001243 0
      -------------------------------------------------------------------------
      001424D8 NB-S  000046 77 SUB-6                       +0002.
      -------------------------------------------------------------------------
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.


U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  1926 001239        TOTAL-ORDER.
  1926 001240            ADD 1 TO SUB-6.
  1926 001241            ADD 1 TO LOOP-OUT.
 586


InterTest™ and SymDump ® 11.0
  1925 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  1925 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
  1925 001245            MOVE 1 TO SUB-6.
  1925 001246        TOTAL-ORDER-EX.
2.Type the following command to execute CAMRCOB2 one verb every 2 seconds: slow 2 and press Enter.
CAMRCOB2 continues a slow execution. As the code executes, you can see the code that is looping, and you can see
the corresponding value of SUB-6 in the keep window.
The following sample screen of a SLOW 2 Execution shows a Loop and SUB-6 problem:
CAMRCOB2 ---------- CA InterTest Batch STEP BEFORE Intercept -----------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001244 001242 001241 001240 001239 001253 001246 001245 001244 001242
       ------------------------------------------------------------------------
       1F08D1C8 NB-S  000044 77 SUB-6                        +0002.
       ------------------------------------------------------------------------
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX


001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  5002 001239        TOTAL-ORDER.
  5002 001240            ADD 1 TO SUB-6.
  5002 001241            ADD 1 TO LOOP-OUT.
  5002 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  5001 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
  5001 001245            MOVE 1 TO SUB-6.
  5001 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
       001248       * The code above will loop. The loop can be      *
Notice that SUB-6 changes from 1 to 2, but back to 1 again. SUB-6 is being reset to 1, and causing the program to
loop. The value of SUB-6 is preventing the exit of the TOTAL-ORDER routine.
3.Halt execution again by pressing the ATTENTION or PA1 key. After the Attention Routine message displays, press
Enter.
The application brings you to another Attention Intercept panel. The current statement is highlighted.
4.To dynamically correct the loop-condition, you could use the SKIP command to bypass the offending statement. The s
line command is another form of the SKIP command.
5.Tab down to the statement: MOVE 1 TO SUB-6, and type S to the left of the line. The following sample screen shows
using Skip to bypass the cause of the loop:


using Skip to bypass the cause of the loop:
CAMRCOB2 ---------- CA InterTest Batch ATTENTION Intercept -------------------  COMMAND ===>
                                    SCROLL ===> CUR
 TRACE=> 001244 001242 001241 001240 001239 001253 001246 001245 001244 001242
       ------------------------------------------------------------------------
       1F08D1C8 NB-S  000044 77 SUB-6                        +0002.
       ------------------------------------------------------------------------
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
 587


InterTest™ and SymDump ® 11.0
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  5002 001239        TOTAL-ORDER.
  5002 001240            ADD 1 TO SUB-6.
  5002 001241            ADD 1 TO LOOP-OUT.
  5002 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  5001 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
 s5001 001245            MOVE 1 TO SUB-6.
  5001 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
       001248       * The code above will loop. The loop can be      *
The application skips the execution of the MOVE statement, and executes the code as if the MOVE statement was
removed.
6.To continue execution from that point, tab up to the first statement in the TOTAL-ORDER routine, ADD 1 to SUB-6, and
type G to the left of the line. Your entry should match the following panel:
The following sample screen shows a continuing execution from the ADD Statement:


The following sample screen shows a continuing execution from the ADD Statement:
CAMRCOB2 ---------- CA InterTest Batch ATTENTION Intercept -------------------  COMMAND ===>
                                    SCROLL ===> CUR
 TRACE=> 001244 001242 001241 001240 001239 001253 001246 001245 001244 001242
       ------------------------------------------------------------------------
       1F08D1C8 NB-S  000044 77 SUB-6                        +0002.
       ------------------------------------------------------------------------
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  5002 001239        TOTAL-ORDER.
 g5002 001240            ADD 1 TO SUB-6.
  5002 001241            ADD 1 TO LOOP-OUT.
  5002 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  5001 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
 S5001 001245            MOVE 1 TO SUB-6.
  5001 001246        TOTAL-ORDER-EX.


5001 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
       001248       * The code above will loop. The loop can be      *
7.Press Enter. CAMRCOB2 resumes execution from the line where you typed G, and continues execution until it
reaches the next unconditional breakpoint. This activity is shown in the following panel. The following screen shows an
unconditional breakpoint at ORDER-CALC-EX:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 588


InterTest™ and SymDump ® 11.0
 TRACE=> 001237 001253 001246 001244 001242 001241 001240 001239 001253 001246
       ------------------------------------------------------------------------
       1F08D1C8 NB-S  000044 77 SUB-6                        +0005.
       ------------------------------------------------------------------------
       001231       * -----------------------------------------------*
 U0001 001232        ORDER-CALC.
  0001 001233            MOVE CUSTOMER-VALUES TO CUSTOMER-ORDER.
  0001 001234            MOVE ZEROES TO ORDER-SUB-TOTAL, SUB-6, LOOP-OUT.
  0001 001235            PERFORM TOTAL-ORDER THRU TOTAL-ORDER-EX
       001236                UNTIL SUB-6 EQUAL 5.
 U---> 001237        ORDER-CALC-EX.
  ---> 001238            GO TO OPTIONS.
  5004 001239        TOTAL-ORDER.
  5005 001240            ADD 1 TO SUB-6.
  5005 001241            ADD 1 TO LOOP-OUT.
  5005 001242            MULTIPLY UNIT-PRICE(SUB-6) BY NO-OF-WIDGETS(SUB-6)
       001243                GIVING ITEM-TOTAL.
  5005 001244            ADD ITEM-TOTAL TO ORDER-SUB-TOTAL.
 S5001 001245            MOVE 1 TO SUB-6.
  5004 001246        TOTAL-ORDER-EX.
       001247       *------------------------------------------------*
       001248       * The code above will loop. The loop can be      *


001248       * The code above will loop. The loop can be      *
CAMRCOB2 finally executed out of the TOTAL-ORDER routine, and continued until it reached unconditional breakpoint
set at ORDER-CALC-EX (one of the unconditional breakpoints included in the data set member demoincl).
You can see from the keep window that the value of SUB-6 is 5. This value is correct to permit the exit of the ORDER-
CALC routine. Thus, the use of the skip command allowed us to dynamically fix the program code that caused the loop,
and continue execution.
Remove the Keep Window and Skip Command
Before going back to the options menu, remove the keep window and skip command.
Follow these steps:
1.Type the REMOVE ALL command.
2.Tab down and overtype the S to the left of the MOVE statement with an X and press Enter.
The keep window is removed, and the skip line command is removed.
3.Continue execution by  typing GO and pressing Enter.CAMRCOB2 resumes execution and displays the Demo Session
Options Menu.
This concludes Option 4: Interrupt a Program Loop. Select another option and go to the appropriate section, or exit the
demo using PF3.
Option 5 Trace Program Execution
This option illustrates the use of the PREVIOUS and ADVANCE commands to help you trace program execution.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminaries, and have the Demo
Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 5 and press Enter.
 589


InterTest™ and SymDump ® 11.0
CAMRCOB2 displays the screen that describes what occurs in this part of the demo session.
2.Press Enter. The application halts CAMRCOB2 at an unconditional breakpoint that you included at the beginning of the
demo.
The following sample screen shows CAMRCOB2 at an unconditional breakpoint:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001055 001158 001157 001156 001155 001153 001147 001146 001139 001137
       001054       *
 U---> 001055        PAY-CALC.
  ---> 001056            PERFORM POPULATE-GRAPH THRU POPULATE-GRAPH-EX
       001057                VARYING SUB-4 FROM 1 BY 1
       001058                    UNTIL SUB-4 GREATER THAN NO-OF-HOURS.
  ---> 001059        PAY-CALC-EX.
  ---> 001060            MOVE SPACES      TO CHEQUE-LINE.
  ---> 001061            MOVE TOTAL-GROSS TO CHEQUE-AMOUNT.
  ---> 001062        PAY-RETURN.
  ---> 001063            GO TO OPTIONS.
       001064       *
  ---> 001065        POPULATE-GRAPH.
  ---> 001066            MOVE MONTH-ITEM(SUB-4)     TO X-AXIS-YTD.
  ---> 001067            MOVE TOKEN-ITEM            TO X-AXIS-R(SUB-4).
  ---> 001068            ADD  MONTHLY-AMOUNT(SUB-4) TO YTD.


---> 001069            MOVE YTD                   TO TOTAL-GROSS.
  ---> 001070        POPULATE-GRAPH-EX.
  ---> 001071            EXIT.
  ---> 001072        DEMONSTRATE-CONDITIONAL-BKPT.
  ---> 001073            CALL 'ISPLINK' USING DSPLY,
Suppose you want to trace the execution path of the program prior to this point. You can have the application scroll back
and display a previously executed statement using the PREV command. The PREV command lets you view previously
executed statements, but does not cause any statements to execute. After you scroll back using the PREV command, you
can scroll forward and retrace execution using the ADVANCE command. You may specify a number from 1 to 999 with the
PREV and ADVANCE commands to scroll more than one statement at a time.
The PREV and ADVANCE commands do not change the statement where CAMRCOB2 resumes execution. The PREV
and ADVANCE only scroll the statements in the trace.
Type PREV 9 in the Command field and press Enter.
The application displays the ninth previous statement executed.
The following screen shows the ninth previous statement:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001055 001158 001157 001156 001155 001153 001147 001146 001139 001137
       001136
  0001 001137        DEMONSTRATE-PREV-COMMAND.
       001138       *
  0001 001139            CALL 'ISPLINK' USING DSPLY,
       001140                                 COBDPN75.
       001141       * -----------------------------------------------*


001141       * -----------------------------------------------*
       001142       * This section of the Demo shows you             *
 590


InterTest™ and SymDump ® 11.0
       001143       * the benefits of using the Prev                 *
       001144       * and Advance commands.. ..                      *
       001145       * -----------------------------------------------*
  0001 001146            MOVE  4        TO    COBDPN71-LENGTHS.
  0001 001147            CALL 'ISPLINK' USING VCOPY,
       001148                                 VCOPY-COBDPN71,
       001149                                 VCOPY-COBDPN71-LENGTHS,
       001150                                 VCOPY-COBDPN71-VALUES,
       001151                                 VCOPY-MOVE.
       001152       *
  0001 001153            IF VCOPY-COBDPN71-EIBAID = 'PF03' OR 'PF15'
  ---> 001154               GO TO OPTIONS.
  0001 001155            MOVE SPACES  TO X-AXIS.
Now you can retrace the execution of the nine statements using the ADVANCE command. The short form of the
ADVANCE command is A or AD. (You must enter the A on the command line.)
Type the A command and press Enter.
The application highlights the next statement executed.
Repeat the Advance step a few more times.
The following screen shows advancing through the program trace:
CAMRCOB2 ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001055 001158 001157 001156 001155 001153 001147 001146 001139 001137
       001136
  0001 001137        DEMONSTRATE-PREV-COMMAND.


0001 001137        DEMONSTRATE-PREV-COMMAND.
       001138       *
  0001 001139            CALL 'ISPLINK' USING DSPLY,
       001140                                 COBDPN75.
       001141       * -----------------------------------------------*
       001142       * This section of the Demo shows you             *
       001143       * the benefits of using the Prev                 *
       001144       * and Advance commands.. ..                      *
       001145       * -----------------------------------------------*
  0001 001146            MOVE  4        TO    COBDPN71-LENGTHS.
  0001 001147            CALL 'ISPLINK' USING VCOPY,
       001148                                 VCOPY-COBDPN71,
       001149                                 VCOPY-COBDPN71-LENGTHS,
       001150                                 VCOPY-COBDPN71-VALUES,
       001151                                 VCOPY-MOVE.
       001152       *
  0001 001153            IF VCOPY-COBDPN71-EIBAID = 'PF03' OR 'PF15'
  ---> 001154               GO TO OPTIONS.
  0001 001155            MOVE SPACES  TO X-AXIS.
You can follow the execution order of the program by following the highlighted lines as you advance through the program
trace. In effect, using PREV and ADVANCE gives you a simulated instant replay of program execution.
Return to the Current Statement
Now you can return to the current statement, that is, the statement where execution was halted prior to the unconditional
breakpoint.
 591


InterTest™ and SymDump ® 11.0
Follow these steps:
1.Type the CS command and Press Enter.
The application displays the original Breakpoint Intercept panel that is shown in the beginning of this option.
2.Type the GO command and press Enter.
CAMRCOB2 resumes execution and displays the Advanced Options Demo Screen. You can continue with any option
or exit.
This concludes Option 5: Trace Program Execution. Select another option and continue with the appropriate section, or
press PF3 to end the demo.
Option 6 Work with Indexed Table Items
This section of the demo session shows you a fast and easy way to inspect and modify the contents of indexed data
items. This section also demonstrates how to use the STEP command to single-step execution.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminaries, and have the Demo
Session Options Menu that is displayed on your screen.
Follow these steps:
1.Select Option 6 and press Enter.
CAMRCOB2 displays a screen that describes what occurs in this part of the demo session.
2.Press Enter.CAMRCOB2 resumes execution.
The next screen that you see is an Abend Intercept panel. The application has automatically halted CAMRCOB2 because
it detected a data exception in the highlighted ADD instruction.
The following screen shows the CAMRCOB2 at an S0C7 Abend Intercept:
CAMRCOB2 ---------- CA InterTest Batch ABEND S0C7 Intercept ------------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001184 001183 001182 001181 001196 001195 001193 001192 001196 001195
  0001 001183            SET C1 TO 5.


0001 001183            SET C1 TO 5.
  0001 001184            ADD +1 TO DISTRICT ( A1, B1, C1 ).
  ---> 001185            MOVE SPACES TO TASK-TEXT OF TASK-STRUCTURE.
       001186       * -----------------------------------------------*
       001187       * This section of the Demo shows you how to      *
       001188       * inspect and change the value of subscripted    *
       001189       * table items.. ..                               *
       001190       * -----------------------------------------------*
  ---> 001191            GO TO OPTIONS.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       LineID ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+
  0018 001192        INITIALIZE-TABLE.
  0018 001193            MOVE SUB-1 TO STATE-NUMBER (SUB-1),
       001194                          COUNTY-NUM1 (SUB-1, SUB-2).
  0018 001195            MOVE ','   TO COUNTY-COMM (SUB-1, SUB-2).
  0018 001196            MOVE SUB-2 TO COUNTY-NUM2 (SUB-1, SUB-2).
  ---> 001197        SET-VAR-REC.
  ---> 001198            MOVE +100 TO VAR-REC-LEN.
  ---> 001199            MOVE ZERO TO VAR-SS.
  ---> 001200        PROCESS-VAR.
 592


InterTest™ and SymDump ® 11.0
If you recall, this type of error was detected and corrected in the basic demo session. To continue execution, find the data
item causing the S0C7 ABEND and dynamically modify it.
Looking at the highlighted breakpoint statement, you might suspect the variable is at fault; it probably was not initialized
correctly. The variable in this case is an indexed table entry.
Display an Indexed Table Entry
To quickly inspect the value of the DISTRICT ( A1, B1, C1 ) field directly from this screen, type K to the left of the
highlighted statement.
Tab to the highlighted ADD instruction, type K (for keep) and press Enter.
The application displays the current value of DISTRICT. Because the k line command requests a display of each item on
that line, the value of each subscripted index item is also displayed.
The following panel shows displaying a keep window for the Table Entry:
CAMRCOB2 ---------- CA InterTest Batch ABEND S0C7 Intercept ------------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001184 001183 001182 001181 001196 001195 001193 001192 001196 001195
       ------------------------------------------------------------------------
       1F08E5BE NP-S  000856 07 DISTRICT                     ?000.
                                   A1  (+1)
                                   B1  (+3)
                                   C1  (+5)
       ------------------------------------------------------------------------
  0001 001183            SET C1 TO 5.
  0001 001184            ADD +1 TO DISTRICT ( A1, B1, C1 ).
  ---> 001185            MOVE SPACES TO TASK-TEXT OF TASK-STRUCTURE.


---> 001185            MOVE SPACES TO TASK-TEXT OF TASK-STRUCTURE.
       001186       * -----------------------------------------------*
       001187       * This section of the Demo shows you how to      *
       001188       * inspect and change the value of subscripted    *
       001189       * table items.. ..                               *
       001190       * -----------------------------------------------*
  ---> 001191            GO TO OPTIONS.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       LineID ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+
  0018 001192        INITIALIZE-TABLE.
  0018 001193            MOVE SUB-1 TO STATE-NUMBER (SUB-1),
The question mark that precedes the value of DISTRICT in the keep window tells us this field does not contain a valid
value. This error triggered the automatic breakpoint.
The keep window also tells us which table entry is at fault. The values of each index item in this window indicate that the
invalid data occurs at element (1, 3, 5).
Dynamically Correct an Uninitialized Table Item
To dynamically correct this error, modify main storage so the field contains valid data. You can use the SET command to
set the value to zero. The application sets the variable using the proper format.
Type the following command: set district (a1,b1,c1) = zero
Press Enter.
The following panel shows correcting the uninitialized Table Item:
 593


InterTest™ and SymDump ® 11.0
CAMRCOB2 ---------- CA InterTest Batch ABEND S0C7 Intercept ------------------
 COMMAND ===> set district (a1,b1,c1) = zero                   SCROLL ===> CUR
 TRACE=> 001184 001183 001182 001181 001196 001195 001193 001192 001196 001195
       ------------------------------------------------------------------------
       1F08E5BE NP-S  000856 07 DISTRICT                     ?000.
                                   A1  (+1)
                                   B1  (+3)
                                   C1  (+5)
       ------------------------------------------------------------------------
  0001 001183            SET C1 TO 5.
  0001 001184            ADD +1 TO DISTRICT ( A1, B1, C1 ).
  ---> 001185            MOVE SPACES TO TASK-TEXT OF TASK-STRUCTURE.
       001186       * -----------------------------------------------*
       001187       * This section of the Demo shows you how to      *
       001188       * inspect and change the value of subscripted    *
       001189       * table items.. ..                               *
       001190       * -----------------------------------------------*
  ---> 001191            GO TO OPTIONS.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       LineID ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+
  0018 001192        INITIALIZE-TABLE.
  0018 001193            MOVE SUB-1 TO STATE-NUMBER (SUB-1),


The application dynamically modifies the value in main storage for DISTRICT ( A1, B1, C1 ), and displays the new value in
the keep window. The message on the top right of the panel reads: SET COMPLETE .
Single-Step Execution
Use the step command to execute just one line of code. The step command lets you determine how many lines are
executed when you use the go command. For example, to execute one line at a time, or single-step, use the command:
step 1.
Type the STEP1 command and press Enter.
The application sets the step count to one and displays the following message: STEP COUNT SET.
The following panel shows setting the step count:
CAMRCOB2 ---------- CA InterTest Batch ABEND S0C7 Intercept ---- STEP COUNT SET
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 001184 001183 001182 001181 001196 001195 001193 001192 001196 001195
       ------------------------------------------------------------------------
       1F08E5BE NP-S  000856 07 DISTRICT                     +000.
                                   A1  (+1)
                                   B1  (+3)
                                   C1  (+5)
       ------------------------------------------------------------------------
  0001 001183            SET C1 TO 5.
  0001 001184            ADD +1 TO DISTRICT ( A1, B1, C1 ).
  ---> 001185            MOVE SPACES TO TASK-TEXT OF TASK-STRUCTURE.
       001186       * -----------------------------------------------*
       001187       * This section of the Demo shows you how to      *
       001188       * inspect and change the value of subscripted    *
       001189       * table items.. ..                               *


001189       * table items.. ..                               *
       001190       * -----------------------------------------------*
 594


InterTest™ and SymDump ® 11.0
  ---> 001191            GO TO OPTIONS.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       LineID ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+
  0018 001192        INITIALIZE-TABLE.
  0018 001193            MOVE SUB-1 TO STATE-NUMBER (SUB-1),
Execute CAMRCOB2 by entering the command: GO and pressing Enter. The ADD statement is executed, and then the
application halts execution and displays a Step Count Intercept panel. The line below the ADD statement is now the
current line, and is highlighted.
Remove the Step Count and Keep Window
When you want to end single-stepping, reset the step count to zero. This action turns off single stepping. Remove the step
count and keep window before continuing execution.
Type the following command: step 0; remove all
Press Enter.
The application resets the step count and removes the keep window.
To display the status of the step count, enter the step command without any count number.
Follow these steps:
1.Type the STEP command and press Enter.
The application displays the value of the step count in the top-right corner; in this case, the message is: NO STEP
COUNT SET.
2.Resume execution of CAMRCOB2 by entering GO.CAMRCOB2 resumes execution, and you return to the Options
Menu.
This concludes Option 6: Work with Indexed Table Items. Select another option and continue with the appropriate section,
or press PF3 to end the demo.
Option 7 Histogram Report


or press PF3 to end the demo.
Option 7 Histogram Report
This option illustrates how to create and view the Histogram Report of Statement Execution. The option is useful in
identifying dead code.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminary, and have the Demo
Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 7 and press Enter.
CAMRCOB2 displays the screen that describes what occurs in this part of the demo session.
2.Press Enter. The application halts CAMRCOB2 at an unconditional breakpoint set at the program exit. The PGM Exit
Intercept panel displays in the following panel.
The following screen shows the Program Exit Breakthrough Intercept panel:
CAMRCOB2 ---------- CA InterTest Batch PGM EXIT Intercept --------------------
 COMMAND ===>                                                  SCROLL ===> CSR
 TRACE=> 000975 000974 000973 001277 001310 001309 001308 001318 001317 001316
  0001 000974            CLOSE REPORT-OUT.
  ---> 000975            GOBACK.
       000976
       000977       * -----------------------------------------------*
 595


InterTest™ and SymDump ® 11.0
       000978       * The " UNCOND ALL EXIT " ( or " AT ALL EXIT " ) *
       000979       * command will cause an Unconditional Breakpoint *
       000980       * at a program's exit point.. ..                 *
       000981       * -----------------------------------------------*
       000982
  0001 000983        OPTIONS-MENU.
       000984       * -----------------------------------------------*
       000985       * Initialise the lengths in case of recursion .. *
       000986       * -----------------------------------------------*
  0001 000987            CALL 'ISPLINK' USING DSPLY,
       000988                                 COBDPN70.
       000989
  0001 000990            MOVE 4         TO OPTION-OPTAID.
  0001 000991            CALL 'ISPLINK' USING VCOPY,
       000992                                 VCOPY-OPTION-LIST,
       000993                                 VCOPY-OPTION-LENGTHS,
This type of unconditional breakpoint is set with the command: UNCOND ALL EXIT or AT ALL EXIT. Prior to exiting the
program, you can request a Histogram Report using the HIST command.
Type the HIST command and press Enter.
The application returns the following message:
'HISTOGRAM SUCCESSFULLY WRITTEN'
View the Histogram Report
The report is written to the data set associated with the ddname INT1REPT that you can view by splitting the screen.
Follow these steps:
1.ISPF users
Tab a few lines down your screen and press the SPLIT PF key that is defined in your ISPF profile (normally PF2).


The ISPF Main Menu displays in the split-screen area.
Roscoe  users
Enter the Roscoe  SPLIT sequence.
A second Roscoe  panel displays.
2.ISPF users
Select the ISPF Browse Facility and request a display of the data set associated with the ddname INT1REPT. You
allocated this data set in the Advanced Demo Preliminaries. The suggested data set name was: userid.INT1REPT
Roscoe  users
Use Roscoe  Attach DSN command to display the data set member associated with the ddname INT1REPT. The
suggested data set name was: userid.INT1REPT.
The first page of the histogram report displays. A sample report is shown in the following panel.
NOTE
In the following example, the data set name is: intbatch.histrept.
The following screen shows Browsing the Histogram Dataset Member:
CAMRCOB2 ---------- CA InterTest Batch PGM EXIT- HISTOGRAM SUCCESSFULLY WRITTEN
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 000975 000974 000973 001277 001310 001309 001308 001318 001317 001316
  0001 000974            CLOSE REPORT-OUT.
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 596


InterTest™ and SymDump ® 11.0
 BROWSE -- USER99 _TSU04928 ------------------------- Line 00000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
1CA InterTest/Batch       Execution Histogram For Program-ID: CAMRCOB2     Date
0
 000876 0001 |*
 000877 0001 |*
 000887 0001 |*
 000888 0001 |*
 000890 0001 |*
 000891 0001 |*
 000892 0001 |*
 000896 0002 |**
 000897 0002 |**
 000898 ---- |
 000900 0002 |**
 000901 0002 |**
 000902 0001 |*
Page down to the end of the report using the maximum command with PF8.
Type the M command and press PF8.
The last page of the Histogram Report displays, as shown in the following panel.
The following screen shows the last page of the Histogram Report:
CAMRCOB2 ---------- CA InterTest Batch PGM EXIT- HISTOGRAM SUCCESSFULLY WRITTEN
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 000975 000974 000973 001277 001310 001309 001308 001318 001317 001316
  0001 000974            CLOSE REPORT-OUT.
 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .


BROWSE -- USER99 _TSU04928 ------------------------- Line 00000246 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
 001310 0017 |*****************
 001311 ---- |
 001312 ---- |
 001313 ---- |
 001314 0034 |**********************************
 001315 0034 |**********************************
 001316 0034 |**********************************
 001317 0034 |**********************************
 001318 0034 |**********************************
              ----+----|----+----|----+----|----+----|----+----|----+----|----+
0            *NOTE* ASTERISKS REPRESENT A SCALE OF 00000001 EXECUTION(S) PER AS
1CA InterTest/Batch       Execution Histogram For Program-ID: CAMRCOB2     Date
-Session Number: 1,175For Userid USER99
-Number of executable statements: 236
0Number of statements executed during this test: 116
0Percentage of statements executed during this test: 49
In the previous panel, you can see that some lines were never executed. Check to see if these lines in the program are
dead code and should be removed.
 597


InterTest™ and SymDump ® 11.0
NOTE
In our example, the unexecuted code starts at line 1311. Note the corresponding line number in your program
that is unexecuted.
ISPF users
Remove your split-screen using the command: X
Roscoe  users
Use the Roscoe  END key to end the second session.
You return to a full-screen display of the Program Exit Intercept shown in the beginning of this option.
Use the Find Statement (FS) command to display the code that was never executed.
Type the FS1311 command and press Enter.
The application displays the requested line of code.
The following screen displays the unexecuted code:
CAMRCOB2 ---------- CA InterTest Batch PGM EXIT Intercept --------------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 000975 000974 000973 001277 001310 001309 001308 001318 001317 001316
  ---> 001311        990-INITIALISE.
  ---> 001312            MOVE SPACES TO DM-TEXT.
  ---> 001313            MOVE ZEROES TO DM-RC.
  0034 001314        990-INCREMENT.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       LineID ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+
  0034 001315            IF  TABLE-SUB LESS THAN 50
  0034 001316                ADD 1 TO TABLE-SUB.
  0034 001317        990-INCREMENT-EX.
  0034 001318            EXIT.


0034 001318            EXIT.
       PP 5655-G53 IBM Enterprise COBOL for z/OS and OS/390 3.1.0     CAMRCOB2
       An "M" preceding a data-name reference indicates that the data-name is mo

        DEFINED   CROSS-REFERENCE OF DATA NAMES   REFERENCES

       000021      ASA-CNTL
       000849      A1                              M1181 1184
       000646      BALANCE-LINE                    M1299
       000640      BALANCE-OUT
       000638      BALANCE-REPORT                  M1298
By reviewing the code, you determine whether it is required. In this case, it is not required for the program and should be
removed.
To remove the code in your programs, you can split the screen again and make the code changes. You can also wait until
you complete the review of the histogram report.
Now return to the current statement in the CAMRCOB2 program.
Follow these steps:
1.Type the CS command and press Enter.
The application displays the Program Exit Intercept panel.
2.To continue the advanced demo, enter the command go options and press Enter. To end the demo, enter the
command GO.
 598


InterTest™ and SymDump ® 11.0
If you are continuing the demo, CAMRCOB2 program execution continues with the display of the Advanced Options
Menu. Choose another option from the menu.
If you are exiting the demo, CAMRCOB2 resumes execution at the normal program exit and terminates. You return to
the Execution Control panel of the Foreground Option. Your previous entries are displayed, letting you begin testing
again, or exit. Use PF3 to exit.
NOTE
Before you proceed, completed the steps that are outlined in Advanced Demo Preliminaries, and have the Demo
Session Options Menu that is displayed on your screen.
Advanced Demo Session for Assembler
This article illustrates an Assembler advanced demo session using CAMRASM.
Before you proceed, completed the steps outlined in Advanced Demo Preliminaries, and have the Initial Intercept for
CAMRASM displayed on your screen.
NOTE
CAMRASM is an ISPF application.
Include Unconditional Breakpoints
Now you are going to set unconditional breakpoints at a number of procedure names in the demo program. In the basic
demo you set an unconditional breakpoint using the U or ) line command, which are both equivalent to the UNCOND
command. However, a quicker way to include unconditional breakpoints for a test session is to place the breakpoint
commands in a data set member, and simply include that member when the Initial Intercept panel displays.
The ASMINCL data set member of CAI.CAVHSAMP contains the application commands that set the breakpoints required
for using the Advanced Options Demo for Assembler. Include this data set member as follows:
Type the following command at the *Initial* Intercept panel:
include asmincl
Press Enter.
The application processes the commands in the asmincl data set, and returns the following message in the upper-right
corner of the screen: BREAKPOINT SET.


corner of the screen: BREAKPOINT SET.
CAMRASM  ---------- CA InterTest Batch *INITIAL* Intercept ----- BREAKPOINT SET
COMMAND ===>                                                  SCROLL ===> CUR
TRACE=> 000005
                       R:D  00000           4          USING LDATA,R13
 *--> 000000 47F0 F074            00074     5          B     START-CAMRASM(,R15
                                            6 *-------------------------------*
                                            7 * Welcome to the CA InterTest   *
                                            8 * Batch Assembler demonstration *
                                            9 * program. You are now at the   *
                                           10 * Initial Breakpoint panel,     *
                                           11 * which is displayed upon entry *
                                           12 * to the first program to be    *
                                           13 * tested. At this point, other  *
                                           14 * breakpoints can be set and    *
                                           15 * control commands can be       *
                                           16 * issued before the program is  *
                                           17 * executed.                     *
 599


InterTest™ and SymDump ® 11.0
                                           18 *-------------------------------*
 *--> 000004 C3C1D4D9C1E2D440              19          DC    CL8'CAMRASM'
 *-->                                      20          DC    CL9'&SYSDATE'
      00000C F0F561F1F661F0F3                +         DC    CL9'05/16/03'
 *-->                                      21          DC    CL6'&SYSTIME'
      000015 F1F74BF5F340                    +         DC    CL6'17.53'
 *--> 00001B C1C4E5C1D5E3C1C7              22          DC    C'CA INT
Access the Demo Session Options Menu
After setting the required breakpoints, access the Demo Session Options Menu by executing the demo program and
choosing the Advanced Options Menu from the Welcome panel.
Follow these steps:
1.From the Initial Intercept panel, type GO and press Enter to execute the program.The demo program begins execution
and displays the Welcome panel.
2.Press PF2 to access the Options Menu for the Advanced Demo Session.The Advanced Options Preliminary Screen is
displayed, reminding you not to access the Options Menu without including the data set member ASMINCL.
3.Press Enter to continue.The Demo Session Options Menu displays.
Each of the Options on the menu is independent and can be performed in any order. To use an Option, follow the
appropriate section. Upon completing an Option, you return to the Menu.
Before you start, you should know that:
•To interrupt a loop-press the ATTN or PA1 key. Try the ATTN key first. If that does not interrupt the loop, your testing


environment requires you to use the PA1 key. If using PA1, you may need to press RESET first.
Exit the Advanced Options Demo
You can exit the demo from the Options Menu at any time.
Follow these steps:
1.Press PF3.The End Demo Session screen displays.
2.Press Enter.The InterTest Batch Program Breakpoint Intercept panel displays for an unconditional breakpoint at label
GOBACK. (This breakpoint was set by a command in the ASMINCL include file.)
3.Type GO and press Enter to execute the program.The demo program ends, and the InterTest Batch Entry panel
displays.
Return to the Advanced Options Demo Session
If you exit the InterTest Batch Demo, you can return at any time to perform another advanced option. Just repeat the
preliminary steps in Access the Demo Session Options Menu. Remember to enter the following command at the Initial
Breakpoint screen:
 include asmincl
Option 1 Time-Controlled Execution
This option illustrates how you can slow the execution of your program. The InterTest Batch SLOW command executes
one statement in your program every few seconds. The exact time interval is specified when you issue the SLOW
command. Using the SLOW command together with a keep window is an especially effective testing technique; it allows
you to halt the program whenever you see a problem, without having to determine the breakpoint in advance.
 600


InterTest™ and SymDump ® 11.0
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries, and you
have the InterTest Batch Demo Session Options Menu displayed on your screen.
This option requires you to interrupt the program by pressing the ATTENTION key or the PA1 key. Before proceeding,
locate each of these keys on your keyboard. If you need help in finding them, ask a technical support person before you
begin.
Follow these steps:
1.Type Option 1 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
2.Press  Enter.InterTest Batch halts CAMRASM at an unconditional breakpoint set at label PAY_CALC. The statement is
highlighted.
Open a keep window that displays the values of YTD and X_AXIS_YTD by entering the commands specified below.
Notice how you can use the short form of the keep command K and use the TSO command delimiter (normally a semi-
colon) to string multiple commands on a single command line.
Type the following command: k ytd; k x_axis_ytd
InterTest Batch displays a keep window showing the current values of YTD and X_AXIS_YTD.
A sample screen showing the keep window for YTD and X_AXIS_YTD follows:
CAMRASM  ---------- CA InterTest Batch UNCOND BEFORE Intercept --------------- COMMAND ===>
                               SCROLL ===> CUR
TRACE=> 000440 000438 000437 000436 000435 000434 000432 000431 000430 000429 0
      -------------------------------------------------------------------------
      0014CE9C AN    001325 02 YTD                          000000000
      0014CE7F AN    001319 02 X_AXIS_YTD
      -------------------------------------------------------------------------


-------------------------------------------------------------------------
 0001 000414 D208 D66B C9BE 0066B 009BE   438          MVC   TOTALGROSS,ZEROS
U---> 00041A                              440 PAY_CALC DS    0H
 ---> 00041A 1F00                         441          SLR   R0,R0
 ---> 00041C 4000 D102            00102   442          STH   R0,SUB_4
 ---> 000420                              444 PAY_CALC_LOOP DS 0H
 ---> 000420 45E0 C440            00440   445          BAL   R14,POPULATE_GRAPH
 ---> 000424 4810 D102            00102   447          LH    R1,SUB_4
 ---> 000428 4110 1001            00001   448          LA    R1,1(,R1)
 ---> 00042C 4010 D102            00102   449          STH   R1,SUB_4
 ---> 000430 4910 C9CE            009CE   451          CH    R1,NO_OF_HOURS
 ---> 000434 4740 C420            00420   452          BL    PAY_CALC_LOOP
 ---> 000438 45E0 C7EC            007EC   454          BAL   R14,UPDATE_CHEQUE
 ---> 00043C 47F0 C316            00316   456          B     OPTIONS
 ---> 000440                              458 POPULATE_GRAPH DS 0H
 ---> 000440 4820 D102            00102   459          LH    R2,SUB_4


---> 000444 4C20 CDF4            00DF4   460          MH    R2,=Y(L'MONTH_ITEM
Issue the SLOW command to execute one statement every two seconds. As the program resumes execution, you
are able to see the changing values of YTD and X_AXIS_YTD. In this demo, you are going to halt execution when the
X_AXIS_YTD value is MAR by pressing the ATTENTION key.
Follow these steps:
1.Type the SLOW 2 command and press Enter.
InterTest Batch initiates a time-controlled execution of CAMRASM, at a rate of one statement every two seconds.
 601


InterTest™ and SymDump ® 11.0
2.When the value of X_AXIS_YTD in the keep window is MAR, press the ATTN or PA1 key. Try the ATTN key first.The
application displays the Attention Intercept panel, as shown in the following panel.
A sample Attention Intercept panel follows:
CAMRASM  ---------- CA InterTest Batch ATTENTION Intercept -------------------
COMMAND ===>                                                  SCROLL ===> CSR
TRACE=> 000474 000473 000470 000468 000467 000466 000463 000461 000460 000459 0
      -------------------------------------------------------------------------
      0013EE9C AN    001323 02 YTD                          017539242
      0013EE7F AN    001317 02 X_AXIS_YTD                   Mar
      -------------------------------------------------------------------------
                       R:2  00000         462          USING MONTH,R2
 0004 00044C D202 D657 2000 00657 00000   463          MVC   X_AXIS_YTD,MONTH_I
                                          464          DROP  R2
 0003 000452 4820 D102            00102   466          LH    R2,SUB_4
               OPTIONS MENU PROCESSING
        Active Usings: CAMRASM(X'1000'),R12  LDATA(X'1000'),R13
        Loc  Object Code    Addr1 Addr2  Stmt   Source Statement
 0003 000456 4C20 CDF6            00DF6   467          MH    R2,=Y(L'X_AXIS_ITE
 0003 00045A 4122 D65B            0065B   468          LA    R2,X_AXIS_LINE(R2)


R:2  00000         469          USING XAXIS,R2
 0003 00045E D201 2000 CA84 00000 00A84   470          MVC   X_AXIS_ITEM,TOKEN_
                                          471          DROP  R2
 0003 000464 4820 D102            00102   473          LH    R2,SUB_4
 0003 000468 4C20 CDF8            00DF8   474          MH    R2,=Y(L'MONTHLY_AM
 0003 00046C 4122 CAAC            00AAC   475          LA    R2,MONTHLY_THIS(R2
                       R:2  00000         476          USING MGROSS,R2
Review what you just did.
•You opened a keep window for two variables whose values you wished to view and compare.
•You used the command slow 2 to have the application slowly execute the program. However, during the program
execution, you could monitor the values of the variables in the keep window.
•You used the ATTENTION or PA1 key to stop program execution, and the Attention Intercept panel displayed.
This combination of using keep windows, the slow command, and an Attention Intercept allows you to carefully control
and monitor your program execution, while tracking the values of specific variables.
NOTE
Attention Intercept panel is only displayed when you press the ATTN or PA1 key and then the application
executes a statement in a program that is currently being monitored.
Remove the Keep Window
Before returning to the Options Menu of the advanced demo, remove the keep window as follows:
Type the REMOVE ALL command and press Enter.
The application removes the keep window for YTD and X_AXIS_YTD on the Attention Intercept panel.
Continue Execution


Continue Execution
Type GO and press Enter to continue execution.CAMRASM resumes execution, and displays the Options Menu.
This concludes Option 1: Time Controlled Execution. Select another option and go to the appropriate section, or exit the
demo using PF3.
 602


InterTest™ and SymDump ® 11.0
Option 2 Set Conditional Breakpoints
This option shows you how to set and use conditional breakpoints.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 2 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
2.Press  Enter.The application halts CAMRASM at an unconditional breakpoint. The statement at the breakpoint is
highlighted.
Access the screen used to set conditional breakpoints. From this screen, you can set both the conditions and any
commands you want executed when the specified condition is met.
Follow these steps:
1.Type the COND command in the Command field and press Enter.
The application displays the When panel. WHEN is a synonym for COND.
2.Make the following entries on the When panel and press Enter.
----------------------- CA InterTest Batch WHEN PANEL -------------------------
OPTION ===>S
   S - SET A WHEN CONDITION
   R - RESET A WHEN CONDITION
   L - OR BLANK, LIST THE WHEN CONDITIONS

SPECIFY DATA AREA NAME(S) AND COMPARISON CONDITION:
   WHEN-NAME    ===> ytdcond
   DATA-AREA-1  ===> subtotal
   OPERATOR     ===> ge        (EQ, NE, LT, GT, LE, GE, =, <>, <, >, <=, >=)
   DATA-AREA-2  ===> 000060000
   AFTER        ===> N         (Y/N)

COMMANDS TO BE EXECUTED AT WHEN CONDITION:
===>  k subtotal; set totalgross = 000200000; k totalgross


===>  k subtotal; set totalgross = 000200000; k totalgross
The application displays the following message in the top right corner of the When panel: WHEN CONDITION SET.
3.Press PF3 to exit the When panel.The application brings you to the Intercept panel.
4.Continue execution by typing GO and pressing Enter.CAMRASM resumes execution until the condition you set for
the YTDCOND breakpoint is met; when the value of SUBTOTAL is greater than or equal to 60000, the application
halts execution, and executes the commands you entered for the conditional breakpoint; it displays a keep window
for SUBTOTAL, sets TOTALGROSS to 200000, and then displays TOTALGROSS in the keep window. Your screen
should look like the Intercept panel in the following screen.
A sample Intercept panel showing condition YTDCOND has been met follows:
CAMRASM  ---------- CA InterTest Batch WHEN YTDCOND BEFORE Intercept ---------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 000545 000544 000543 000542 000541 000539 000538 000537 000536 000523
       ------------------------------------------------------------------------
       001428CE AN    001329 02 SUBTOTAL                     00009716H
       001428B3 AN    001324 02 TOTALGROSS                   000200000
 603


InterTest™ and SymDump ® 11.0
       ------------------------------------------------------------------------
 GR 0-7 00000000 00000002 1F1A0C90 1F1A0FA6 00142A1E FFEBD5E2 00000000 00000000
    8-F 00000000 00000000 00000000 00000000 9F1A01C8 00142248 9F1A06A2 00000000
       ------------------------------------------------------------------------
  0003 00050E F384 D686 D058 00686 00058   543          UNPK  SUBTOTAL,LDWORK(5)
  0003 000514 96F0 D68E      0068E         544          OI    SUBTOTAL+8,X'F0'
  0002 000518 D208 D67D D686 0067D 00686   545          MVC   BILL_YTD,SUBTOTAL
                                           546          DROP  R2
  0002 00051E 07FE                         548          BR    R14
  ---> 000520                              550 DEMONSTRATE_SPLIT_SCREEN DS 0H
                                           551 *-------------------------------
                                           552 * This section of the demo
                                           553 * shows you how to SPLIT the
                                           554 * screen ..
                                           555 *-------------------------------
  ---> 000520 58F0 D050            00050   556          L     R15,LDLINK@
                                           557          CALL (15),(DSPLY,COBDPN
Now remove the conditional breakpoint before continuing.
Follow these steps:
1.Return to the When panel by entering the WHEN command and pressing  Enter.
The When panel displays.


The When panel displays.
2.Type the following on the When panel and press Enter:
OPTION: ===> r
WHEN NAME ===> ytdcond
The application displays the following message in the top right corner of the When panel: WHEN DELETED.
3.Press PF3 to exit the When panel.The application brings you to the previous Intercept panel.
Remove the Keep Window and Continue Execution
Remove the keep window before continuing execution.
Type the REMOVE ALL command and press Enter.
The keep window is removed.
Return to the Options Menu by continuing execution.
Type GO and press Enter.CAMRASM resumes execution and displays the Options Menu.
This concludes Option 2: Conditional Breakpoints. Select another option and go to the appropriate section, or exit the
demo using PF3.
Option 3 Update Source Code
This option illustrates how you can use the ISPF or split-screen capability from any screen. One way to use this feature is
to update your source code as soon as you find errors during your test session.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 3 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
 604


InterTest™ and SymDump ® 11.0
2.Press Enter.The application halts CAMRASM at an unconditional breakpoint at the label SPLIT_SCREEN.
3.Tab about halfway down your screen and press the SPLIT PF key defined in your ISPF profile (normally PF2).The
ISPF Primary Option Menu displays in the bottom half of your screen.
Update Your Source Code
If you had found an error in your program code, you can use the ISPF menu to access and edit your source code before
continuing with your test session.
For example, in the basic demo, the application stopped execution of the program because it detected an S0C7 ABEND.
You were able to continue execution by dynamically changing the value of Tasknum to zero. This was a one-time patch.
To correct the problem, you need to update your source code so that Tasknum is properly initialized. You can do this from
any Intercept panel by splitting your screen to edit your source code.
Continue Execution
Follow these steps:
1.Remove your ISPF split-screen using the command: =XYou return to a full-screen display of the unconditional
breakpoint shown in the previous panel.
2.Type GO and press Enter to continue execution.You return to the Demo Options Menu.
This concludes Option 3: Update Source Code. Select another option and go to the appropriate section, or exit the demo
using PF3.
Option 4 Interrupt a Looping Program
This option illustrates how to interrupt and verify that you have a looping program. It also illustrates the use of the skip
command.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
This option requires you to interrupt the program by pressing the ATTENTION key or the PA1 key. Before proceeding,


locate each of these keys on your keyboard. If you need help, ask a technical support person before you begin.
Follow these steps:
1.Type Option 4 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
2.Press Enter.The application halts CAMRASM at an unconditional breakpoint set at ORDER_CALC.
NOTE
If the Frequency Counter arrows and numbers are not displayed along the left side of your screen, turn the
frequency display on by entering the command: freq.
3.Continue execution by typing GO and pressing enter.CAMRASM resumes execution. Notice the system light remains
on. There are additional breakpoints and screen panels in the demo program code, yet all you see is the system light.
This is symptomatic of a looping program. Halt the program to see what is going on.
4.Press the ATTN or PA1 key. Try the ATTN key first. If that does not work, your testing environment requires you to use
the PA1 key. Press RESET before pressing the PA1 key to unlock the terminal keyboard.The Attention Intercept panel
displays.
Continue with the Continuing from the Attention Routine section.
 605


InterTest™ and SymDump ® 11.0
NOTE
If you do not successfully stop execution with the ATTN or PA1 key before 1024 executions of the demo
program loop, you reach a safety net conditional breakpoint. If you reach this breakpoint, instructions for
continuing are given in the next section.
Continue from the “Safety Net” Conditional Breakpoint
Follow this section only if you see the breakpoint in the following panel. If you do not, continue with the Continuing from
the Attention Routine section that follows.
To continue with the looping program demo, you must press the ATTN or PA1 key before 1024 executions of the loop this
time. To continue the program loop, use the following steps:
1.Find label ORDER_CALC: fp order_calc
2.Press Enter to go to the label.
3.Type G to the left of the line:
XC ORDER_SUB_TOTAL,ORDER_SUB_TOTAL
4.Press Enter to continue the loop execution.
5.Press the ATTN key or the RESET, then PA1 keys. Try the ATTN key first. If that does not work, your testing
environment requires you to use the PA1 key.
NOTE
Even if PA1 stopped the slow execution in option 1, you may need to press ATTN to stop a loop.
You should see the Attention Intercept panel.
To return to the Options Menu:
1.Enter the command: go options
2.Press Enter.
You return to the Options Menu. You can try the same option again, even if you did not complete it the first time, or
select another option from the menu.
Continue from the Attention Routine
The application now displays the Attention Intercept panel.
CAMRASM keeps executing the TOTAL_ORDER routine. The current statement is highlighted.
Look at the frequency counters to the left of the program statements. They show repeated execution of the


Look at the frequency counters to the left of the program statements. They show repeated execution of the
TOTAL_ORDER statements, indicating a loop. To investigate the logic in TOTAL_ORDER, you can set a keep window
for SUB_6 and then execute slowly using the SLOW command. This time you use the abbreviated form of the keep
command: K.
Follow these steps:
1.Type the following command to set the keep window: k sub_6. Press Enter.
The application displays a keep window for the variable SUB_6.
A sample screen showing the Keep Window to View SUB_6 follows:
CAMRASM  ---------- CA InterTest Batch STEP BEFORE Intercept -----------------
OMMAND ===>                                                  SCROLL ===> CUR
TRACE=> 000652 000651 000649 000648 000647 000646 000638 000637 000641 000640 0
      -------------------------------------------------------------------------
      0013F92E HX    001237 02 SUB_6                        0001
      -------------------------------------------------------------------------
                       R:2  00000         650          USING ORDER,R2
 1131 0005CE F873 D058 2002 00058 00002   651          ZAP   LDWORK,UNIT_PRICE
 606


InterTest™ and SymDump ® 11.0
 1130 0005D4 FC73 D058 2006 00058 00006   652          MP    LDWORK,NO_OF_WIDGE
 1130 0005DA D204 D0F3 D05B 000F3 0005B   653          MVC   ITEM_TOTAL,LDWORK+
                                          654          DROP  R2
 1130 0005E0 4810 D106            00106   656          LH    R1,SUB_6
 1130 0005E4 4110 1001            00001   657          LA    R1,1(,R1)
 1130 0005E8 4010 D106            00106   658          STH   R1,SUB_6
 1130 0005EC 4810 D10C            0010C   660          LH    R1,LOOP_OUT
 1130 0005F0 4110 1001            00001   661          LA    R1,1(,R1)
 1130 0005F4 4010 D10C            0010C   662          STH   R1,LOOP_OUT
 1129 0005F8 D201 D106 C9CC 00106 009CC   664          MVC   SUB_6,ONE
 1129 0005FE 07FE                         666          BR    R14

 ---> 000600                              668 DEMONSTRATE_PREV_COMMAND DS 0H
                                          669 *-------------------------------*
                                          670 * This section of the demo      *


669 *-------------------------------*
                                          670 * This section of the demo      *
2.Type the SLOW 2 command to execute one CAMRASM statement every two seconds and press Enter.
CAMRASM continues a slow execution. As the code executes, you can see the code looping, and you can see the
corresponding value of SUB_6 in the keep window.
Notice in the sample screen that SUB_6 changes from 1 to 2, but back to 1 again. SUB_6 is being reset to 1, and
causing the program to loop. The value of SUB_6 is causing the TOTAL_ORDER routine to continue to be executed.
3.Halt execution again by pressing the ATTENTION or PA1 key. After the Attention Routine message displays, press
Enter.
The application brings you to another Attention Intercept panel. The current statement is highlighted.
4.To dynamically correct the loop-condition, you could use the SKIP command to bypass the offending statement. The s
line command is another form of the SKIP command.
5.Tab down to the statement: 'MVC SUB_6,ONE' and type S to the left of the line.The application skips the statement
that sets SUB_6 to 1, and executes the code as if the statement was removed.
6.Back up to the first statement in the TOTAL_ORDER procedure, 'LH R2,SUB_6', and type G to the left of the line, to
continue execution from that point.Press Enter.CAMRASM resumes execution from the line where you entered the g,
and continues execution until it reaches the next unconditional breakpoint, as shown in the following panel.
The following sample screen shows an unconditional breakpoint at ORDER_CALC_EX:
CAMRASM  ---------- CA InterTest Batch ATTENTION Intercept -------------------
COMMAND ===>                                                  SCROLL ===> CUR


COMMAND ===>                                                  SCROLL ===> CUR
TRACE=> 000652 000651 000649 000648 000647 000646 000638 000637 000641 000640 0
      -------------------------------------------------------------------------
      0013F92E HX    001237 02 SUB_6                        0001
      -------------------------------------------------------------------------
 1129 0005BA 4740 C5B0            005B0   641          BL    ORDER_CALC_LOOP
U---> 0005BE                              643 ORDER_CALC_EX DS 0H
 ---> 0005BE 47F0 C316            00316   644          B OPTIONS
 1131 0005C2                              646 TOTAL_ORDER DS 0H
 1131 0005C2 4820 D106            00106   647          LH    R2,SUB_6
 1131 0005C6 4C20 CE00            00E00   648          MH    R2,=Y(ORDER_LEN)
 1131 0005CA 4122 D6E4            006E4   649          LA    R2,CUSTOMER_ORDERS
                       R:2  00000         650          USING ORDER,R2
 1131 0005CE F873 D058 2002 00058 00002   651          ZAP   LDWORK,UNIT_PRICE
 1130 0005D4 FC73 D058 2006 00058 00006   652          MP    LDWORK,NO_OF_WIDGE
 1130 0005DA D204 D0F3 D05B 000F3 0005B   653          MVC   ITEM_TOTAL,LDWORK+
                                          654          DROP  R2


654          DROP  R2
 1130 0005E0 4810 D106            00106   656          LH    R1,SUB_6
 607


InterTest™ and SymDump ® 11.0
 1130 0005E4 4110 1001            00001   657          LA    R1,1(,R1)
 1130 0005E8 4010 D106            00106   658          STH   R1,SUB_6
 1130 0005EC 4810 D10C            0010C   660          LH    R1,LOOP_OUT
 1130 0005F0 4110 1001            00001   661          LA    R1,1(,R1)
CAMRASM finally exited out of the loop that executed the TOTAL_ORDER routine and then continued until it reached the
unconditional breakpoint set at ORDER_CALC_EX (one of the unconditional breakpoints included in the data set member
asmincl).
You can see from the keep window that the value of SUB_6 is 5. This is the proper value to permit the exit of the
ORDER_CALC routine. Thus, the use of the skip command allowed us to dynamically fix the program code that caused
the loop, and continue execution.
Remove the Keep Window and Skip Command
Before going back to the options menu, remove the keep window and skip command.
Follow these steps:
1.Type the REMOVE ALL command. Tab down to the 'MVC SUB_6,ONE' statement in the TOTAL_ORDER routine and
type over the S to the left of the statement with X. Press  Enter.
The keep window is removed, and the skip line command is removed.
2.Continue execution by  typing GO and pressing Enter.CAMRASM resumes execution and displays the Demo Session
Options Menu.
This concludes Option 4: Interrupt a Program Loop. Select another option and go to the appropriate section, or exit the


demo using PF3.
Option 5 Trace Program Execution
This option illustrates the use of the PREVIOUS and ADVANCE commands to help you trace program execution.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 5 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
2.Press Enter.The application halts CAMRASM at an unconditional breakpoint that you included at the beginning of the
demo.
Suppose you want to trace the execution path of the program prior to this point. You can have the application scroll back
and display a previously executed statement using the PREV command. The PREV  command lets you view previously
executed statements, but does not cause any statements to execute. After you scroll back using the PREV command, you
can scroll forward and retrace execution using the ADVANCE command. You may specify a number from 1 to 999 with the
PREV and ADVANCE commands to scroll more than one statement at a time.
The PREV and ADVANCE commands do not change the statement where CAMRASM resumes execution; the PREV and
ADVANCE only scroll the statements in the trace.
Follow these steps:
1.Type the PREV 9 command in the Command field and press Enter.
The application displays the ninth previous statement executed. Now you can retrace the execution of the nine
statements using the ADVANCE command. The short form of the ADVANCE command is A or AD. (You must enter
the A on the command line.)
2.Type the A command and press Enter.
 608


InterTest™ and SymDump ® 11.0
The application highlights the next statement executed.
3.Repeat the Advance step a few more times.You can follow the execution order of the program by following the
highlighted lines as you advance through the program trace. In effect, using PREV and ADVANCE gives you a
simulated instant replay of program execution.
Return to the Current Statement
Now you can return to the current statement, that is, the statement where execution was halted prior to the unconditional
breakpoint.
Follow these steps:
1.Type the CS command and press Enter.
The application displays the original Breakpoint Intercept panel shown in the beginning of this option.
2.Type the GO command and press Enter.
CAMRASM resumes execution and displays the Advanced Options Demo Screen. You can continue with any option or
exit.
This concludes Option 5: Trace Program Execution. Select another option and continue with the appropriate section, or
press PF3 to end the demo.
Option 7 Histogram Report
This option illustrates how to create and view the histogram report of statement execution, which is useful in identifying
dead code.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
Follow these steps:
1.Type Option 7 and press Enter.
CAMRASM displays the screen that describes what occurs in this part of the demo session.
2.Press Enter.The application halts CAMRASM at an unconditional breakpoint set at the program exit. Prior to exiting the
program, you can request a histogram report using the HIST command.
3.Type the HIST command and press Enter.
The application returns the following message: 'HISTOGRAM SUCCESSFULLY WRITTEN'
View the Histogram Report


View the Histogram Report
The report is written to the data set associated with the ddname INT1REPT that can be viewed by splitting the screen.
Follow these steps:
1.Tab a few lines down your screen and press the SPLIT PF key defined in your ISPF profile (normally PF2).The ISPF
Main Menu displays in the split-screen area.
2.Select the ISPF Browse Facility and request a display of the data set associated with the ddname INT1REPT. You
allocated this data set in Advanced Demo Preliminaries . The suggested data set name was: userid.INT1REPT.The first
page of the histogram report displays.
3.Page down to the end of the report using the maximum command with PF8.
4.Type the M command. Press PF8.
The last page of the histogram report displays.
5.Remove your split-screen using the command: X.You return to a full-screen display of the Program Exit Intercept.
Use the Find Statement (FS) command to display the code that was never executed.
Type the FS 902 command and press Enter.
The application displays the requested line of code.
 609


InterTest™ and SymDump ® 11.0
NOTE
Depending on your assemble options, line 902 may not be the label WRITE_ERROR. If this is the case, use the
statement number you found by scrolling up from the end of the histogram report.
By reviewing the code, you can determine whether or not it is required. In this case, it is an error routine and should be
retained.
If unexecuted code needs to be removed from your own programs, you can split the screen again and make the code
changes, or wait until you complete the review of the histogram report.
Now return to the current statement in the CAMRASM program.
Follow these steps:
1.Type the CS command and press Enter.
The application displays the Program Exit Intercept panel.
2.To continue the advanced demo, enter the command go options and press Enter. To end the demo, enter the
command GO.
If you are continuing the demo, CAMRASM program execution continues with the display of the Advanced Options
Menu. Choose another option from the menu. If you are exiting the demo, CAMRASM resumes execution at the
normal program exit, and terminates. You return to the Execution Control panel of the Foreground Option. Your
previous entries are displayed, allowing you to begin testing again, or exit. Use PF3 to exit.
Advanced Demo Session for PL/I
This article illustrates a PL/I advanced demo session using CAMRPLI.
Before you proceed, completed the steps outlined in Advanced Demo Preliminarie, and have the Initial Intercept for
CAMRPLI displayed on your screen.
NOTE
CAMRPLI is an ISPF application.
Include Unconditional Breakpoints
Now you are going to set unconditional breakpoints at a number of procedure names in the demo program. In the basic


demo you set an unconditional breakpoint using the U or ) line command, which are both equivalent to the UNCOND
command. However, a quicker way to include unconditional breakpoints for a test session is to place the breakpoint
commands in a data set member, and simply include that member when the Initial Intercept panel displays.
The PLIINCL data set member of CAI.CAVHSAMP contains the commands that set the breakpoints required for using the
Advanced Options Demo for PL/I. Include this data set member as follows:
Enter the following command at the *Initial* Intercept panel: include pliincl
Press Enter.
The application processes the commands in the pliincl data set, and returns the following message in the upper-right
corner of the screen: BREAKPOINT SET.
  CAMRPLI  ---------- CA InterTest Batch *INITIAL* Intercept ----- BREAKPOINT SET
  COMMAND ===>                                                  SCROLL ===> CUR
  TRACE=> 000001
        *************************** Top of Data ********************************
                            SOURCE LISTING
            STMT LEV NT
   *-->
               1      0  CAMRPLI: PROC OPTIONS (MAIN);
 610


InterTest™ and SymDump ® 11.0

 /*------------------------------------------------*/
                            /* Welcome to the CA InterTest Batch    */
                            /* PL/I demonstration program. You are now at the
 */
                            /* Initial Breakpoint panel which is displayed
 */
                            /* upon entry to the first program to be tested.
 */
                            /* At this point, other breakpoints can be set
 */
                            /* and control commands can be issued before the
 */
                            /* program is executed.
 */

 /*------------------------------------------------*/
               2   1  0     DCL  REPORT                    FILE RECORD
 SEQUENTIA
                                                           ENV (F,
 RECSIZE(80));
               3   1  0     DCL  1 LINE_OUT,
                                    3 ASA_CNTL             CHAR(1),

Access the Demo Session Options Menu
After setting the required breakpoints, you can access the Demo Session Options Menu by executing the demo program
and choosing the Advanced Options Menu from the Welcome panel.
Follow these steps:
1.In the Initial Intercept panel, type GO and press Enter to execute the program.The demo program begins execution
and displays the Welcome panel.
2.Press PF2 to access the Options Menu for the Advanced Demo Session.The Advanced Options Preliminary Screen is
displayed, reminding you not to access the Options Menu without including the data set member PLIINCL.
3.Press Enter to continue.The Demo Session Options Menu is displayed.
A sample Demo Session Options Menu follows:
Each of the options on the menu is independent and can be performed in any order. To use an option, follow the
appropriate section. Upon completing an option, you return to the Menu.
Before you start, you should know that:


Before you start, you should know that:
To interrupt a loop-press the ATTN or PA1 key. Try the ATTN key first. If that does not interrupt the loop, your testing
environment requires you to use the PA1 key. If using PA1, you may need to press RESET first.
Exit the Advanced Options Demo
You can exit the demo from the Options Menu at any time.
Follow these steps:
1.Press PF3.The End Demo Session screen is displayed.
 611


InterTest™ and SymDump ® 11.0
2.Press Enter.The Program Breakpoint Intercept panel displays for an unconditional breakpoint at label
RETURN_TO_OPSYS. (This breakpoint was set by a command in the PLIINCL include file.)
3.Type GO and press Enter to execute the program.The demo program ends, and the Entry panel is displayed.
Return to the Advanced Options Demo Session
If you exit the demo, you can return at any time to perform another advanced option. Just repeat the steps in Access the
Demo Session Options Menu. Remember to enter the following command at the Initial Breakpoint screen:
 include pliincl

Option 1 Time-Controlled Execution
This option illustrates how you can slow the execution of your program. The SLOW command executes one statement
in your program every few seconds. The exact time interval is specified when you issue the SLOW command. Using the
SLOW command together with a keep window is an especially effective testing technique; it lets you halt the program
whenever you see a problem, without having to determine the breakpoint in advance.
NOTE
Before proceeding, be sure you have completed the steps outlined in Advanced Demo Preliminaries and you
have the Demo Session Options Menu displayed on your screen.
This option requires you to interrupt the program by pressing the ATTENTION key or the PA1 key. Before proceeding,
locate each of these keys on your keyboard. If you need help in finding them, ask a technical support person before you
begin.
Follow these steps:
1.Select option 1 and Press  Enter.
CAMRPLI displays the screen that describes what occurs in this part of the demo session.
2.Press  Enter.The application halts CAMRPLI at an unconditional breakpoint set at procedure PAY_CALC. The
procedure statement is highlighted.


procedure statement is highlighted.
3.Open a keep window that displays the values of YTD and X_AXIS_YTD by entering the commands specified below.
Notice how you can use the short form of the keep command K and use the TSO command delimiter (normally a semi-
colon) to string multiple commands on a single command line. Type the following command: k ytd; k x_axis_ytd
The application displays a keep window showing the current values of YTD and X_AXIS_YTD. A sample screen
showing the keep window for YTD and X_AXIS_YTD follows:
 CAMRPLI  ---------- CA InterTest Batch UNCOND BEFORE Intercept ---------------
 COMMAND ===>                                                  SCROLL ===> CUR
 TRACE=> 000168 000094 000093 000092 000091 000088 000087 000086 000085 000084
 0

 -------------------------------------------------------------------------
       1F1A84EF NP-S  000090 02 YTD                          +0000000.00
       1F1A84F7 AN    000089 03 X_AXIS_YTD

 -------------------------------------------------------------------------

 U--->      168   1  0     PAY_CALC: PROC ( I );

            169   2  0        DCL I                        PIC '999';
            170   2  0        DCL J                        FIXED BIN(15);

  --->      171   2  0        DO J = 1 TO I BY 1;
 612