Identifying cause of the loop through tools
You can identify causes for loops through tools.
If you cannot find the cause of a loop by using these
techniques, you can try the following methods:
- Use the interactive tools that TXSeries provides. For example, CEDF or the IBM Application Debugging Program (CICS for AIX).
- Modify the program, and run it again.
- Use the ANIMATOR debugging tool.
Investigating loops using interactive tools
- If the loop returns control to TXSeries, you can use the CEDF transaction to look at parts of your program and the storage that is owned by the task at each interaction with TXSeries®. CEDF is a good way to investigate whether an unexpected return code has caused the problem.
- To look at other areas of storage such as the COMMAREA (which is storage accessed by the GETMAIN command), you can write out the areas of storage to temporary storage and browse it by using the CEBR transaction.
- You can CECI and CEBR to examine the status of files and queues during the running of your program. Programs must test for, and handle, conditions in which they do not find records and queue entries, or they might react unpredictably.
Modifying your program to investigate the loop
- If the program is extremely complex, or the data path difficult to follow, you might have to insert additional statements into the source code. Extra ASKTIMEs allow you to use CEDF and inspect the program at more points. You can also request dumps from within your program, and insert user trace entries.
Using IBM Application Debugging Program
- You can use the IBM Application Debugging Program to debug programs in the supported programming languages. This involves starting the CICS-supplied transaction CDCN against a particular terminal, system, transaction, or program.
Application debugging tools
- You can use ANIMATOR or IDEBUG (IBM COBOL) to debug COBOL programs.
These tools allow you to set breakpoints in your own code and, therefore,
detect loops that do not return control to TXSeries. For Windows only,
you can use the debugging tools that are supported by the compilers
that are listed in Table 1.
Table 1. Application debugging tools Language Compiler Debugger C Microsoft Visual C++ windbg/msdev C++ Microsoft Visual C++ windbg/msdev COBOL Micro Focus COBOL ANIMATOR Note: CICS does not support OO techniques in COBOL.
See Application program debugging for more information.