This chapter takes you step-by-step through the basic demo session. Performing the demo at a terminal is the best way to begin learning about this product. If a terminal is not available, you can still learn about the application by reading the chapter as a “paper demo.”
This section contains the following topics:
Access the Primary Option Menu
Specify the Program to be Tested
Determine the Cause of the Error
Dynamically Change the Value in Tasknum
Remove the Breakpoint and Keep Window
When you finish the demo session, you know how to:
The examples in this guide use default library names and generic references to keystrokes, which differ from installation to installation (for example, the CA Roscoe END key or SPLIT command sequence).
Because the guide cannot anticipate differences at your installation, you need to know certain information specific to your product installation before attempting the examples shown in this manual.
To run the application, you need to know the ISPF option or the CLIST name that calls the application. The examples assume a default ISPF option. Consult your installer to determine the procedure for invoking the application at your installation.
The source for the demo programs: CAMRPLI, CAMRASM, CAMRCOB, CAMRCOB2, CAMRDMR, CAMRDMR2, and CAMRCOBB are in CAI.CAISRC. Use your compile procedures created during installation to compile a demo program, populate the PROTSYM, and link the program.
For the advanced demo session, see the appendix “Advanced Demo Session.” CA Roscoe users need to know the key sequence required to split their one session into two sessions. Consult your CA Roscoe documentation or system programmer.
Begin the demo session by accessing the application and selecting the Foreground option from the menu. The sample demo programs are:
|
CAMRCOB |
OS/VS COBOL demo for ISPF users |
|
CAMRCOB2 |
COBOL II demo for ISPF users |
|
CAMRPLI |
PL/I Demo for ISPF users |
|
CAMRASM |
Assembler demo for ISPF users |
|
CAMRDMR |
OS/VS COBOL demo for CA Roscoe users |
|
CAMRDMR2 |
COBOL II demo for CA Roscoe users |
|
CAMRCOBB |
COBOL II Batch Link Demo |
The panels in this chapter illustrate a COBOL II demo session using CAMRCOB2. The screen images of other demos vary from the panels shown in this guide, but the steps for performing the demo are the same.
When testing a program such as CAMRCOB2 or CAMRCOB, the application automatically intercepts all abends. How this works is illustrated later when the application prevents the demo program from abending because of an S0C7.
To access the application, select the option for CA InterTest™ Batch on your ISPF/PDF Primary Option Menu or enter the name of the CLIST from ISPF Option 6. CA Roscoe users can select the CA InterTest™ Batch option on the CA Roscoe menu or enter the following commands:
[xxx.]IBALLOC [xxx.]IBRUN
where xxx is the prefix of the library where the application is installed. The Primary Option Menu looks like the one shown in the following panel. The options are slightly different for CA Roscoe users.
----------- CA InterTest™ Batch PRIMARY OPTION MENU ------------------ OPTION ===> Release - r8.5 1 Foreground - Test a Program in Foreground Level - SP00 2 Core - Display and Alter Virtual Storage Userid - USER01 3 Allocation - Allocations and JCL Conversion Time - 17:49:16 4 Map - Address Space Map Date(G) - 09/13/09 5 Batch - Batch Link Facility Date(J) - 05.256 U Utilities - Symbolic Utilities and Preferences X EXIT - Terminate the Session PFkeys: HELP - Tutorial END - Exit Copyright (C) 2009 CA. All rights reserved.
Take a quick look at each of these options before beginning the Demo Session:
|
Option |
Explanation |
|
|---|---|---|
|
1 |
Foreground |
Lets you test the execution of an application. |
|
2 |
Core |
Lets you display and alter virtual memory in hexadecimal and character format. |
|
3 |
Allocation |
Lets you allocate the files you use in your test session. This option is not available for CA Roscoe users, who should use the IBCONV RPF for file allocations. |
|
4 |
Map |
Lets you view task control blocks for help in debugging complex system-related problems. |
|
5 |
Batch |
Lets you test an application to be executed in batch. |
|
U |
Utilities |
Lets you display and update the contents of a PROTSYM. |
|
X |
Exit |
Terminates the application. |
In addition, you can access the tutorial from the Primary Option Menu by pressing your HELP PFkey (normally PF1). The tutorial gives a summary of application facilities and commands.
Each of the demo programs require certain DDs to be allocated before they can be executed correctly. These DDs can be allocated by converting CAI.CAISRC(DEMOJCL) to ALIB format and by using that ALIB. Use the ALLOC command from within the ALIB editor to allocate those files, or the TSO ALLOC command. The SYSOUT, SYSPRINT, and REPORT are the required DD names and can all be allocated to a SYSOUT class. For more information about converting JCL to ALIB format, see the chapter “Allocations Facility for ISPF."
Note: For instructions on converting JCL to CA Roscoe RPF format, see the chapter “JCL Conversion for CA Roscoe.”
Begin by selecting the Foreground option.
|
Action: |
On the Primary Option Menu, key in: 1 Press Enter. |
|
Result: |
The Execution Control Panel displays. This is where you specify the name of the application to be tested. |
--------------- CA InterTest™ Batch EXECUTION CONTROL Panel -------------------- COMMAND ===> ------------------------------ Allocations ------------------------------------ ALIB Dsname ===> Member ===> EXEC Job Step ===> Proc Step ===> -------------------------- Execution Overrides -------------------------------- PGM ===> demopgm Initial Commands ===> PARM ===> or Number of Linkage Parameters ===> Task Libraries ===> 'user01.load' DSNAME ===> or ===> (DDNAME) ===> ===>
|
Action: |
In the PGM field, enter the name of the program that you are going to debug (CAMRCOB, CAMRCOB2, and so on) In the first Task Libraries field, enter the load library that you linked the demo program into. |
|
Result: |
The Monitor Control panel displays. The Monitor Control panel lets you specify the name of the programs you are testing and the name of the PROTSYM files where the symbolics for those programs are stored. |
---------------- CA InterTest™ Batch MONITOR CONTROL Panel --------------------- COMMAND ===> Monitor PL/I ==> N --------------------Monitored Programs ----------------------------- ==> CAMRCOB2 ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ----------Symbolic (PROTYSM) Files ----------------Endevor Auto Populate ----------------- ==> 'CAI.PROTSYM' ==> N |Always | ==> ==> N |Auto-Populate | ==> ==> |Non-LE-Enabled | ==> ==> |Assembler? | ==> ==> |==> N (Y/N) | ==> ==> ----------------- ==> ==>
|
Action: |
Enter the name of the demo program and the PROTSYM file that was used when the program was compiled. |
|
Result: |
The application accesses the listing for the COBOL program you specified, and displays the *Initial* Intercept panel. |
Each time you begin testing, the application displays an *Initial* Intercept (or Breakpoint) panel upon entry to the first program to be tested. The *Initial* breakpoint displays the program listing positioned at the first executable statement. Look at the different parts of this panel.
Note: The text and panels in this guide reference the COBOL II program CAMRCOB2.
The statement line numbers shown in this manual may not exactly match the line numbers you see on your screen.
CAMRCOB2 ---------- CA InterTest™ Batch *INITIAL* Intercept ------------------- COMMAND ===> SCROLL ===> CUR TRACE=> 000876 000875 PROCEDURE DIVISION USING PARAMETER-AREA. 000876 START-PROGRAM. 000877 OPEN OUTPUT REPORT-OUT. 000878 * -----------------------------------------------* 000879 * Welcome to the CA InterTest™ Batch COBOL II * 000880 * Demonstration Program. You are now at the * 000881 * Initial Breakpoint panel which is displayed * 000882 * upon entry to the first program to be tested. * 000883 * At this point, other breakpoints can be set * 000884 * and control commands can be issued before the * 000885 * program is executed. * 000886 * -----------------------------------------------* 000887 MOVE R1498-TIMEI TO R1498-TIME. 000888 PERFORM TIME-EDIT THRU TIME-EDIT-EX. 000889 * 000890 MOVE R1498-TIMEO TO R1498-TIME. 000891 PERFORM TIME-EDIT THRU TIME-EDIT-EX. 000892 GO TO DISPLAY-1ST-PANEL. 000893 * -----------------------------------------------* 000894 * THIS ROUTINE EDITS INPUT TIME FOR VALIDITY *
This panel is described next:
The top line of this panel contains 3 parts:
The command Line is where you enter application control commands.
The Trace Line displays up to ten statement numbers. The first number is the statement about to be executed, followed by the last nine statements executed. The previous example shows only the statement number about to be executed and the statement number of START-PROGRAM.
The Line Command field is where you enter a single-character command that relates to a specific line of code.
The listing displays and the statement about to be executed is highlighted.
The Frequency Counter indicates how many times an instruction was executed in this session. The first time you use the Foreground option, the frequency counter is turned on, but may not be displayed.
To enable the display, enter the following on the command Line:
|
Action: |
Key in the command: freq Press Enter. |
000881 * Initial Breakpoint panel which is displayed * 000882 * upon entry to the first program to be tested. * 000883 * At this point, other breakpoints can be set * 000884 * and control commands can be issued before the * 000885 * program is executed. * 000886 * -----------------------------------------------* *--> 000887 MOVE R1498-TIMEI TO R1498-TIME. *--> 000888 PERFORM TIME-EDIT THRU TIME-EDIT-EX. 000889 * *--> 000890 MOVE R1498-TIMEO TO R1498-TIME. *--> 000891 PERFORM TIME-EDIT THRU TIME-EDIT-EX. *--> 000892 GO TO DISPLAY-1ST-PANEL. 000893 * -----------------------------------------------* 000894 * THIS ROUTINE EDITS INPUT TIME FOR VALIDITY *
Result:
A message ? indicates the frequency counter was turned on, and the frequency counter arrows ? are displayed along the left side of the program statements. Since the program has not yet executed any statements, the frequency counter does not display any numbers.
Now you are ready to execute the demo program. The command to execute a program is GO.
|
Action: |
Key in the command: go Press Enter. |
|
Result: |
CAMRCOB2 begins execution and displays the "Welcome Panel" illustrated in the following panel. |
******************************************************************************* ******************************************************************************* ***** ***** ***** Welcome to the CA InterTest™ Batch Demo Session ***** ***** ***** ***** ***** ***** Before proceeding, please have on hand the User Guide ***** ***** which accompanies the Demo Session. ***** ***** ***** ***** In this Demo, we will debug a COBOL program which is ***** ***** included with CA InterTest™ Batch. ***** ***** ***** ***** ***** ***** To continue the Basic Demo, press ENTER. ***** ***** ***** ***** To access the Options Menu, press PF2. ***** ***** ***** ***** ***** ***** ENTER Basic Demo PF2 Advanced Options Menu PF3 Exit Demo ***** ******************************************************************************* *******************************************************************************
Action:
Press Enter to continue the demo.
Result:
CAMRCOB2 resumes execution.
The next screen you see is another type of Intercept panel, an Abend Intercept panel. It tells you that the application halted your program because it detected an error.
CAMRCOB ---------- CA InterTest™ Batch ABEND S0C7 Intercept ------------------ COMMAND ===> SCROLL ===> PAGE TRACE=> 000938 000935 000933 000931 000925 000920 001291 001290 001283 001282 0 00937 0001 00938 ADD +1 TO TASKNUM. 00939 ----------------------------------------------------------------- | THE FOLLOWING AUTOMATIC BREAKPOINT OCCURRED: | | INTERCEPT IN PROGRAM CAMRCOB AT #000938 REASON: ABEND S0C7 | | PRESS ENTER TO REMOVE THIS MESSAGE. | ----------------------------------------------------------------- ---> 00945 DISPLAY-2ND-PANEL. ---> 00946 CALL 'ISPLINK' USING DSPLY, 00947 SECOND-PANEL. 00948 * ---------------------------------------------- * 00949 * .. Now to send the third panel which explains * 00950 * what we have done so far .. .. * 00951 * * 00952 * ---------------------------------------------- * ---> 00953 DISPLAY-3RD-PANEL.
Look at the top line of the screen. It tells you the application detected an S0C7 ABEND, and stopped execution because of it. When the application stops program execution, it halts the program at a breakpoint. It can do this automatically, as in the case illustrated, or it can halt a program at a breakpoint that was set by you, the programmer.
Now look at the highlighted ADD instruction. Execution of that ADD instruction triggered the S0C7 ABEND. The application intercepted the abend and then displayed the diagnostic screen you are currently viewing.
The abend type indicates that the problem was caused by improperly formatted data. Which data? Since ADD +1 TO Tasknum triggered the breakpoint, it is likely that Tasknum contains improperly formatted data.
Note: The application intercepted CAMRCOB2 after the abend and identified the problem.
Next:
Confirm our guess that the value stored in Tasknum is not valid by displaying its current value.
|
Action: |
Tab down to the line containing the highlighted ADD statement. Type k to the left of the statement, and press Enter. |
CAMRCOB2 ---------- CA InterTest™ Batch ABEND S0C7 Intercept ------------------ COMMAND ===> SCROLL ===> CUR TRACE=> 000939 000936 000934 000932 000926 000921 001292 001291 001284 001283 0 000938 k0001 000939 ADD +1 TO Tasknum. 000940 000941 * -----------------------------------------------* 000942 * * 000943 * The above statement causes a 0C7.. .. * 000944 * * 000945 * -----------------------------------------------* ---> 000946 DISPLAY-2ND-PANEL. ---> 000947 CALL 'ISPLINK' USING DSPLY, 000948 SECOND-PANEL. 000949 * -----------------------------------------------* 000950 * .. Now to send the third panel which explains * 000951 * what we have done so far .. .. * 000952 * * 000953 * -----------------------------------------------* ---> 000954 DISPLAY-3RD-PANEL. ---> 000955 CALL 'ISPLINK' USING DSPLY,
|
Result: |
A Keep Window displays containing the current value of Tasknum, as illustrated in the next panel. |
CAMRCOB2 ---------- CA InterTest™ Batch ABEND S0C7 Intercept ------------------ COMMAND ===> SCROLL ===> CUR TRACE=> 000939 000936 000934 000932 000926 000921 001292 001291 001284 001283 0 ------------------------------------------------------------------------- 0E7F24D0 NP-S 000498 03 TASKNUM ?00000. ------------------------------------------------------------------------- 000938 0001 000939 ADD +1 TO Tasknum. 000940 000941 * -----------------------------------------------* 000942 * * 000943 * The above statement causes a 0C7.. .. * 000944 * * 000945 * -----------------------------------------------* ---> 000946 DISPLAY-2ND-PANEL. ---> 000947 CALL 'ISPLINK' USING DSPLY, 000948 SECOND-PANEL. 000949 * -----------------------------------------------* 000950 * .. Now to send the third panel which explains * 000951 * what we have done so far.... *
If you take a look at the contents of Tasknum, you see that the first character is a question mark. The application displays the question mark when the field does not contain properly formatted data. The value of Tasknum triggered the S0C7 ABEND.
Now that you have identified that the value in Tasknum caused the S0C7 ABEND, let us fix it dynamically.
Note: In real testing, you might search the program listing or program execution path to investigate the source of the error, and perhaps even update your program code using a split-screen. These tasks are all performed in the advanced demo session in the appendix “Advanced Demo Session.” For now, assume that zero was the value intended, correct the value of Tasknum, and continue our testing.
|
Action: |
Key in the command: set tasknum = 0 Press Enter. |
|
Result: |
The application dynamically sets the value of Tasknum to zero, as indicated in the message that displays in the top-right corner of the screen: SET COMPLETE. You can see the new value of Tasknum in the Keep Window (+00000.). |
CAMRCOB2 ---------- CA InterTest™ Batch ABEND S0C7 Intercept ------ SET COMPLETE COMMAND ===> SCROLL ===> CUR TRACE=> 000939 000936 000934 000932 000926 000921 001292 001291 001284 001283 ------------------------------------------------------------------------ 0E7F24D0 NP-S 000498 03 TASKNUM +00000. ------------------------------------------------------------------------ 000938 0001 000939 ADD +1 TO Tasknum. 000940 000941 * -----------------------------------------------* 000942 * * 000943 * The above statement causes a 0C7.. .. * 000944 * * 000945 * -----------------------------------------------* ---> 000946 DISPLAY-2ND-PANEL. ---> 000947 CALL 'ISPLINK' USING DSPLY, 000948 SECOND-PANEL. 000949 * -----------------------------------------------* 000950 * .. Now to send the third panel which explains * 000951 * what we have done so far .. .. * 000952 * * 000953 * -----------------------------------------------* ---> 000954 DISPLAY-3RD-PANEL. ---> 000955 CALL 'ISPLINK' USING DSPLY, 000956 THIRD-PANEL. 000957 *
Note: You do not have to know the type of data (binary, packed, and so on) or the length of Tasknum to correctly set its value. The SET command is comparable to a MOVE statement that automatically takes care of different data types and their lengths.
Now that the value in Tasknum has been properly initialized to zero, you could continue testing by resuming program execution.
This is also a good opportunity to learn about an important feature: your ability to control program execution by setting breakpoints.
One of the problems with traditional testing methods is that you have little or no control over program processing. You simply initiate the program, and the program either runs to completion, loops, or abends.
With this product, you can control program execution in a number of ways. For example, you can set "stops," called breakpoints, anywhere in your program. You can set two types of breakpoints: unconditional and conditional.
Once a program is stopped, you can use the application's testing and debugging facilities to do the following:
Note: All of these activities are described in detail in the advanced demo session in the appendix “Advanced Demo Session.”
The next section demonstrates how easy it is to control program execution by setting an unconditional breakpoint.
You can set unconditional breakpoints directly on any breakpoint display using the line command u, or the command UNCOND.
See how to set a breakpoint before the execution of the DISPLAY‑2ND‑PANEL using the u line command.
|
Action: |
Type u to the left of the paragraph name DISPLAY-2ND-PANEL. Type GO to continue execution from where the program is currently stopped (at the statement ADD +1 TO Tasknum). |
CAMRCOB2 ---------- CA InterTest™ Batch ABEND S0C7 Intercept ------ SET COMPLETE COMMAND ===> SCROLL ===> CUR TRACE=> 000939 000936 000934 000932 000926 000921 001292 001291 001284 001283 0 ------------------------------------------------------------------------- 0E7F24D0 NP-S 000498 03 TASKNUM +00000. ------------------------------------------------------------------------- 000938 0001 000939 ADD +1 TO Tasknum. 000940 000941 * -----------------------------------------------* 000942 * * 000943 * The above statement causes a 0C7.. .. * 000944 * * 000945 * -----------------------------------------------* u---> 000946 DISPLAY-2ND-PANEL. ---> 000947 CALL 'ISPLINK' USING DSPLY, 000948 SECOND-PANEL. 000949 * -----------------------------------------------* 000950 * .. Now to send the third panel which explains * 000951 * what we have done so far .. .. * 000952 * * 000953 * -----------------------------------------------* ---> 000954 DISPLAY-3RD-PANEL.
|
Result: |
The application resumes program execution and continues until it reaches the breakpoint that you just set. |
The application halts the program before the first executable statement in the paragraph is executed and displays the screen.
CAMRCOB2 ---------- CA InterTest™ Batch UNCOND BEFORE Intercept --------------- COMMAND ===> SCROLL ===> PAGE TRACE=> 000949 000948 000941 000938 000936 000934 000928 000923 001294 001293 0 ------------------------------------------------------------------------- 001507E0 NP-S 000500 02 TASKNUM +00001. ------------------------------------------------------------------------- 000940 0001 000941 ADD +1 TO Tasknum. 000942 000943 * -----------------------------------------------* 000944 * * 000945 * The above statement causes a 0C7.. .. * 000946 * * 000947 * -----------------------------------------------*
U---> 000948 DISPLAY-2ND-PANEL. ---> 000949 CALL 'ISPLINK' USING DSPLY, 000950 SECOND-PANEL. 000951 * -----------------------------------------------* 000952 * .. Now to send the third panel which explains * 000953 * what we have done so far .. .. * 000954 * * 000955 * -----------------------------------------------* ---> 000956 DISPLAY-3RD-PANEL. ---> 000957 CALL 'ISPLINK' USING DSPLY, 000958 THIRD-PANEL.
Note that the top line of the screen now identifies the reason for stopping as UNCOND BEFORE INTERCEPT. This indicates that the application has halted the program at a breakpoint you set.
Notice the U to the left of the paragraph DISPLAY-2ND-PANEL. It identifies the breakpoint as an Unconditional breakpoint. The first executable statement in that paragraph is the CALL statement. This is the statement that is about to be executed, or the current statement.
When you are stopped at a breakpoint, you can do the following:
When debugging your own programs, you typically perform one or more of these activities and they are described in detail in the next chapter. However, CAMRCOB2 does not have any more errors, so we are just going to complete the demo session.
As you continue testing and debugging, it is a good practice to remove breakpoints you no longer need, so that the program will not stop unnecessarily. Remove the unconditional breakpoint you just set so CAMRCOB2 will not stop before each execution of DISPLAY-2ND-PANEL in our test session. To reset the display, we are also going to remove the Keep Window.
|
Action: |
Key in the following command to remove the Keep Window: remove all Tab down and type over the U with an x to remove the breakpoint. Press Enter. |
CAMRCOB2 ---------- CA InterTest™ Batch UNCOND BEFORE Intercept --------------- COMMAND ===> SCROLL ===> CUR TRACE=> 000946 000939 000936 000934 000932 000926 000921 001292 001291 001284 0 ------------------------------------------------------------------------- 0E7F24D0 NP-S 000498 03 TASKNUM +00001. ------------------------------------------------------------------------- 000938 0001 000939 ADD +1 TO Tasknum. 000940 000941 * -----------------------------------------------* 000942 * * 000943 * The above statement causes a 0C7.. .. * 000944 * * 000945 * -----------------------------------------------* x---> 000946 DISPLAY-2ND-PANEL. ---> 000947 CALL 'ISPLINK' USING DSPLY, 000948 SECOND-PANEL. 000949 * -----------------------------------------------* 000950 * .. Now to send the third panel which explains * 000951 * what we have done so far .. .. * 000952 * * 000953 * -----------------------------------------------* ---> 000954 DISPLAY-3RD-PANEL.
|
Result: |
The application removes the Keep Window and the unconditional breakpoint. |
Notes on the remove command:
|
Action: |
Type GO to continue program execution. |
|
Result: |
CAMRCOB2 next displays a screen confirming that you have successfully corrected the problem in the demo program. |
********************************************************************** ***** ***** ***** CA InterTest™ Batch Demo Session ***** ***** ***** ********************************************************************** You have now successfully corrected the S0C7 problem. Press ENTER to continue the Demo Session.
|
Action |
Press Enter. |
|
Result: |
CAMRCOB2 displays the following demo summary screen. |
********************************************************************** ***** ***** ***** CA InterTest™ Batch Demo Session ***** ***** ***** ********************************************************************** You have completed the sample CA InterTest™ Batch test session. As part of this session, you: * displayed program source code and compiler output online * displayed and modified main storage * controlled program execution This is just a fraction of CA InterTest™ Batch's capabilities. Other features are described in the extended demonstration which you can access by pressing PF2. Hit ENTER to terminate this Demo session.
|
Action: |
To complete this part of the sample test session, press Enter. |
|
Result: |
CAMRCOB2 displays the demo exit screen shown in the following panel. |
********************************************************************** ***** ***** ***** CA InterTest™ Batch Demo Session ***** ***** ***** ********************************************************************** END DEMO SESSION ( Hit Enter )
|
Action: |
Exit the demo program by pressing Enter. |
|
Result: |
The Execution Control Panel displays. Each time you complete or quit a foreground test session, the application returns you to the Execution Control Panel with the message:
|
Note: To end the demo session, exit the application using the CA Roscoe END-key (usually PF3) or the ISPF END-key or command.
To continue with the advanced demo session, skip to the appendix “Advanced Demo Session”.
The demo session has taught you the basics of using this product to test a program. You have learned how to:
|
Copyright © 2013 CA.
All rights reserved.
|
|