CICS Debugging

CA InterTest for CICS is an interactive testing and debugging product for CICS applications written in COBOL, PL/1, and Assembler. Specific compilers support includes:
caitsd-11-0
CA InterTest for CICS Product Features
CA InterTest for CICS is an interactive testing and debugging product for CICS applications written in COBOL, PL/1, and Assembler. Specific compilers support includes:
  • Assembler
  • COBOL
  • COBOL II
  • COBOL/370
  • COBOL II or COBOL/370 with CA Optimizer/II
  • IBM Enterprise COBOL for z/OS
  • PL/1
  • PL1/370
  • PL/1 for MVS
  • IBM Enterprise PL/1 for z/OS
CA InterTest for CICS is an essential tool for both application and system programmers:
  • It makes CICS testing faster, easier, and more effective.
  • It prevents CICS crashes by automatically detecting and preventing application errors before they damage CICS.
  • It provides powerful capabilities for examining and modifying main and auxiliary storage.
Fast, Easy Testing
The primary function of CA InterTest for CICS is to help application programmers test and debug their programs quickly and efficiently. CA InterTest for CICS has many features that simplify testing, including:
  • Interactive testing ability through the CA InterTest for CICS monitor
  • Error detection and prevention
  • Diagnostic information display screens
  • Program interruption through setting breakpoints
  • Isolated test sessions through monitoring by CICS User ID
Interactive Testing The CA InterTest for CICS Monitor
CA InterTest for CICS allows interactive testing. When CA InterTest for CICS detects an error, you can correct it dynamically (or go around it) and resume testing, allowing you to correct many errors in one test session.
With CA InterTest for CICS, you no longer need dumps. All the information you need to diagnose and correct errors is available online. You can continue testing without recompiling your program or waiting for new printouts.
CA InterTest for CICS acts as an intermediary between your CICS program and the CICS system. Here is how CA InterTest for CICS operates:
  • You instruct CA InterTest for CICS to monitor a program, and then run the program.
  • CA InterTest for CICS inspects every instruction and CICS command before it executes to make sure neither the program nor CICS itself will fail.
  • If an error is detected, CA InterTest for CICS automatically interrupts the program. This temporary interruption in program execution is called a
    breakpoint
    .
  • CA InterTest for CICS then displays a diagnostic screen explaining the nature of the problem and provides detailed technical information for correcting it.
Error Detection and Prevention
CA InterTest for CICS detects and prevents errors before they occur. This means your programs will not abend. CA InterTest for CICS does not permit storage violations that could corrupt the data of other programs or cause CICS to fail.
CA InterTest for CICS inspects every COBOL, PL/1 statement or Assembler instruction and every CICS Command. CA InterTest for CICS can detect and prevent the following errors:
  • All storage violations (attempts to modify storage not owned by your program)
  • Any CICS abend that can occur in a command level program
  • All improper or invalid CICS requests (Commands)
  • Any statement that would cause a program check or other abend
  • All illegal or invalid instructions (for example, STOP RUN)
  • All wild branches
  • All violations of CICS standards
Diagnostic Information
CA InterTest for CICS provides the information you need to diagnose and correct errors. When CA InterTest for CICS detects an error, it halts the program before the error occurs. This temporary halt in program execution is called an
automatic breakpoint
. CA InterTest for CICS then displays a screen of diagnostic information indicating the statement or instruction triggering the breakpoint, and CA InterTest for CICS explains why the error occurred.
The breakpoint display explains why CA InterTest for CICS halted the program. The program instruction that triggered the breakpoint is highlighted. You can use all of the CA InterTest for CICS facilities to find and correct the error without analyzing a dump.
Interrupt Programs by Setting Breakpoints
To help you test and debug CICS programs effectively, you can also interrupt program execution at any point by setting breakpoints. You can set four types of breakpoints:
Unconditional
-- the program stops when it reaches a specified location.
Conditional
-- the program stops when it reaches a specified location and a prescribed condition is met (for example, a variable exceeds a certain limit).
Variable-change
-- the program stops at any location if the value of a specified variable has changed (COBOL and Assembler only).
Request
-- the program stops when it reaches specified CICS Commands, calls to DL/I or DB2, and calls to subroutines, such as database software.
You also can instruct CA InterTest for CICS to halt your program each time it executes a specified number of COBOL verbs, PL/1 statements, or Assembler instructions.
Controlling the pace at which a program executes makes it easier to pinpoint and correct logic errors. For example, when a program is halted, you can inspect the values of program variables and test data to determine whether processing is proceeding as planned. You can also dynamically change the value of a data item or generate additional test records before resuming execution.
When a program is stopped at a breakpoint, you can resume execution at any time and from any point. This means you can go around errors or dynamically alter the order in which certain routines are executed. When your program is halted at a breakpoint, you can do the following tasks:
  • View your program listing and compiler output online and search for a data string
  • Display data items in a Keep window to observe changes in their values
  • Display and modify main storage
  • Display and modify auxiliary storage
  • Set and remove breakpoints
  • Instruct CA InterTest for CICS to halt the program after it executes a specified number of COBOL verbs, PL/1 statements, or Assembler instructions
  • Write and execute indirect commands, which are statements you insert during a test session, without recompiling the source code
  • Display the path (backtrace) that brought the program to its current point
  • Display the execution counts of the lines that brought the program to its current point
  • Resume program execution or abend the task
  • Initiate any CICS transaction
Stable CICS Test and Production Systems
CA InterTest for CICS protects CICS test and production systems because it will not permit errors that could damage CICS.
In your test CICS system, you can instruct CA InterTest for CICS to inspect every program for errors. In addition to spotting program errors, CA InterTest for CICS detects and prevents all CICS storage violations. With CA InterTest for CICS, CICS test systems are less likely to crash, so programmers can work more productively. Additionally, program errors are confined to a single program -- other programs remain unaffected. Therefore, system throughput improves because trial and error testing is eliminated, test programs need fewer recompiles, and CICS is much more stable.
CA InterTest for CICS also helps maintain stable CICS production systems. Using CA InterTest for CICS in CICS test systems means programs are less likely to have bugs when they go into production. CA InterTest for CICS can also monitor new, modified, and problem programs in production until they are completely debugged. In an emergency, CA InterTest for CICS can even monitor all the programs in the production system until you isolate the error. Special options let you adapt CA InterTest for CICS to specific production situations.
Examine and Modify Main and Auxiliary Storage
CA InterTest for CICS has powerful facilities for examining and modifying main and auxiliary storage. You can take advantage of these facilities while testing a program. For example, you can interrupt program execution at various points to see how the values of program variables and test data have changed. And, you can dynamically modify storage as your testing progresses.
Example
You can halt your program, change the value in a flag, initialize a counter, or change the data in a test record, and then resume execution -- all without recompiling.
You can inspect and modify main and auxiliary storage at any time -- even when no program is executing and CA InterTest for CICS is otherwise inactive. System programmers can use CA InterTest for CICS to fine-tune CICS. They can display the contents of CICS control blocks and tables in main storage, making changes as necessary.
CA InterTest for CICS also makes it easy to maintain files online without writing one-time programs. You can use CA InterTest for CICS to add, update, and delete records in VSAM and BDAM files and DL/I, DB2 and SQL/DS databases. With CA InterTest for CICS, it is easy to browse a file and search for a character string. CA InterTest for CICS also lets you create and delete transient data and temporary storage records.
Get HELP
The CA InterTest for CICS comprehensive Help facility is available from every CA InterTest for CICS screen. Online help explains how to use all of the CA InterTest for CICS facilities, provides important information on diagnosing and correcting program errors, and includes examples. You can access the Help facility by entering Help on a blank screen. Press
PF1
to access context-sensitive help from any screen. For example, when CA InterTest for CICS halts your program at an automatic breakpoint, you can press
PF1
to get more information on the error that caused the breakpoint.
User-Defined Help for Abends
You can define your own abend codes and descriptions or replace the delivered abend descriptions with your own text. If user-defined text is defined for an abend code, CA InterTest for CICS displays your site's help text instead of the delivered help text at an automatic breakpoint. For more information, see CA InterTest for CICS Options.
Online Access to Source Listings and Compiler Output
With CA InterTest for CICS, you never have to wait for printouts. CA InterTest for CICS provides online access to your source listings and compiler output, such as maps, cross-reference tables, and messages -- information your online editor cannot provide. Working directly from your source listing makes it easy to set breakpoints and display main storage.
Symbolic Support
CA InterTest for CICS lets you reference all program locations by the names you have defined in the program, so you can forget about displacements or address changes after recompiling. You can inspect the contents of a data item simply by specifying its name. If you set breakpoints at symbolic locations and then recompile your program, CA InterTest for CICS can transfer those breakpoints to the recompiled program. You can also access all CICS system-related areas by field names. CA InterTest for CICS even provides full symbolic support for programs that consist of separately compiled modules brought together when the program is link-edited. These modules can be written in the same or different languages.
CA InterTest for CICS supports both PROTSYM and DWARF formats for debugging COBOL programs. For more information, see Symbolic Support.
CA InterTest for CICS Components
CA InterTest for CICS consists of these CICS transactions:
ITST
– Displays the ISPF-like Primary Option Menu, which provides access to all other CA InterTest for CICS and CA SymDump for CICS Option facilities without having to know any other transaction or command.
LIST
-- Displays online COBOL, PL/1, and Assembler source listings and compiler output.
CNTL
-- Controls program monitoring.
CORE
-- Inspects and modifies main storage.
FILE
-- Displays and updates CICS files, DL/I, DB2, and SQL/DS databases, temporary storage, or transient data.
HELP
-- Provides online assistance for using CA InterTest for CICS.
You can use any of these transactions at any time. Your program does not have to be executing for you to use CORE to display or change the contents of main storage, and you can use FILE to update a file or create a test file whether or not CA InterTest for CICS is monitoring any programs.
Different Methods of Using CA InterTest for CICS
Novice CICS programmers will learn to take advantage of the many features of CA InterTest for CICS because it is not necessary to learn command syntax. Standard ISPF-like menus and selection screens make it easy to access any component in CA InterTest for CICS at any time.
The ITST transaction displays the Primary Option Menu from which you can access any CA InterTest for CICS function.
Specially formatted displays and screens also enable you to bypass menu processing by using special commands or single keystrokes for the most frequently used testing functions. For example, you can instruct CA InterTest for CICS to set monitoring, breakpoints or display main storage simply by pressing a PF key or entering a single action character next to a line in your source listing display. A command line on the top of any Source Listing or Breakpoint display lets you access a main menu or a specific menu function by entering its fastpath syntax (=X.Y.Z).
More experienced users often find it faster to enter transaction-based commands for LIST, CNTL, CORE, and FILE facilities directly.
Example
Entering LIST=COBDEMO directly from CICS immediately displays the Source Listing Display of the program COBDEMO, where you can quickly set breakpoints before you begin executing the program.
You can also mix and match different methods during a single test session to meet your testing needs.