Application programmers have an exciting new tool they can use to make user programs much easier to debug, therefore producing more durable programs. No longer must we depend on the DISPLAY statement in our COBOL programs or the “ready trace replacement” code as our tools of choice! IBM’s Debug Tool for VSE/ ESA brings an effective new resource to the VSE user community. After using and working with the
Debug Tool over the past several years, as well as teaching training courses, I will share some of my experiences and ideas. Note that Debug Tool works with COBOL, C/VSE, and PL/I applications executing with Language Environment, and works for batch and online applications — same product, same commands!
Debug Tool: The Basics
Before using Debug Tool to debug an application, you need to do a couple of things. First, compile your program with the TEST(ALL,SYM) compiler option. You can compile your program using a CBL or PROCESS statement in your source, or as a PARM to the compiler. In addition, you need to make the LISTING of the compiler output available for the debugging session. Luckily, IBM supplies an exit you can specify on your compile JCL that puts the listing in a file as well as to SYSLST. Make a note here, that as part of the installation you need to set up specific files to use with Debug Tool, or you will completely lose control of where things are! It is very useful to set up the following:
- A library specifically for Debug Tool listings (or several if you have different application groups); otherwise, the listings will be written to the first sublibrary in the source search chain:
- Specific JCL for compiling programs for use with Debug Tool
- Specific JCL for executing programs with Debug Tool.
Since the partition will be “tied up” for the duration of the Debug Tool session, dynamic partitions are an excellent choice for DT execution. Dynamic partitions also allow some control over how many Debug Tool sessions can be active at a given point.
Note that as part of the installation you identify via VTAM applid generation how many TOTAL debug sessions can be started at the same time.
- Specific libraries for the PHASE members for debugging. This will allow you to maintain control of your system.
Figure 1 shows a sample of the JCL for compiling a COBOL program for Debug Tool testing.
IBM Debug Tool for VSE/ESA Installation Considerations
When you install Debug Tool there are supplied jobs that will help to “configure” Debug Tool for both batch and CICS usage. Step 4 of the Installation and Customization Guide discusses setting up/configuring VTAM, which is required for using the “interactive batch” debugging capability, and Step 5 addresses configuring (adding the CSD group EQA) CICS so that you can use Debug Tool with CICS applications. The CSD group also includes the supplied transaction, DTCN, which is the best way to set up a CICS transaction for Debug Tool. It is extremely valuable to run the supplied Installation Verification Programs (IVPs) to test both batch and CICS; the supplied IVPs allow you to test in any of the three supported languages and to ensure that the installation process is complete. Note that even if you do not have C/VSE programs, the C specific run-time libraries, as described in the Installation and Customization Guide, are required.