How to debug a CICS application on AIX using IBM Debugger?
IBM Debugger for AIX is a debugging tool that provides a rich graphical debugging experience. This document list steps that you need to follow to debug TXSeries applications ( compiled with IBM C/C++ or IBM COBOL or IBM PL/I compilers) using IBM Debugger 18.104.22.168 on AIX. The debugger client for Windows is bundled along with the IBM Debugger software.
You need to install the IBM Debugger client UI on Windows desktop. Once installed, the IBM debugger UI can be launched from Start Menu > Programs > IBM > IBM Debugger for AIX. The UI will be spawned. Once a workspace is selected, the IBM Debugger UI will appear. See the following image.
By default, the debugger will listen to port 8001. You can change the debugger UI port to a different port number by clicking green icon that appears on the top panel as shown:
The green icon indicates that the Debugger UI is listening to that particular port. If the icon is red, then it indicates that the UI is not listening to any port.
After starting the IBM Debugger, you need to configure the region for debugging:
To enable debugging on CICS region, complete the following steps:
- Change the AllowDebugging parameter to YES in the Region Definition (RD) file.
- Set RSLCheck to none for the transaction CDCN for the Transaction Definition (TD) file.
- Compile the program to be debugged with the -a flag.
- Set DER_DBG_PATH="source directory for the files that need to be debugged" in region environment file.
- Set CICS_IDEBUG_LIBPATH="library path of IBM debugger" in the region environment file. (/usr/idebug/engine/lib)
You need to cold start the region for the changes to reflect.
You need to run the CDCN transaction from a terminal. The DISPLAY parameter needs to be provided as shown:
“IP of the machine where the UI is listening:” Port where UI is listening” For example, if the desktop where the UI is listening is having an IP, 22.214.171.1248 and if the UI is listening to port 1234, the DISPLAY parameter will be "126.96.36.1998:1234".
You need to enter the resources that you want to debug (suppose PROG) and press Enter. The following messages would be displayed on the terminal:
ERZ104056I: Successfully configured debugging on for program ‘PROG'
ERZ104072I: The display to be used for the debugging information is
The resource is now enabled for debugging.
When the resource is executed, the program gets attached to the Debugger UI for debugging. You need to select Thread1 from the left panel of the Debugger UI and this program structure will be displayed on the panel. Once the program has been selected and the breakpoints set, you can browse the source code as required.