Compiling and Debugging a CICS Program

Question: How do I compile a CICS online program? What is the procedure for debugging a CICS program? What steps should we follow after coding?chandru

Answer: The DFHEITCL procedure is the easiest way to do this as it contains the translate, compile and link edit steps that you need. The job to run this proc will look something like this for MVS (substitute your values for the items in lowercase):

You should process and test your maps first before using them in your program.

To debug your CICS program you can use the CEDF (execution diagnostic facility) command within CICS. This can be run either in single screen or dual screen mode, it's easier with two screens. This will interrupt the execution of your CICS program every time that the program executes a CICS command to let you know which command is being executed. You can also examine all of the values stored in memory at each of these points (using F5).

An easier way to test your CICS programs is to use one of the third party programs that have been developed for this purpose. They allow you to set break points wherever you need them in your code not at every CICS command like CEDF does. My favourite third party CICS debugging program is Xpediter.