Question & Answer
Question
How do you debug a COBOL program in IBM Rational Developer for i (RDi) or IBM Rational Developer for Power systems (RDp)?
Cause
New users cannot find information on debugging a COBOL program using RDi or RDp client.
Answer
If you are starting with a COBOL program (extension is cbl) then you have two options:
A. Debug interactively using a 5250 session to issue the STRRSESVR command.
This command will create a link between the 5250 session and the RDi client.
B. Create a new COBOL ILE program shell (extension is cblle) that contains the COBOL program, and use the Set Service Entry Point(SEP).
Method B steps to set the SEP once a COBOL ILE program has been created:
- In the Remote System Explorer (RSE) view, right click on the program.
For example, right click on: QSYSLIB/MYLIB.LIB/QCOBOLSRC.FILE/CBLDBG2.CBLLE
- Select Debug (Service Entry) > Set Service Entry Point
- On the Set Service Entry Point dialog ensure that the Library, Program, and Userid are all set correctly, and click OK
You should receive a message stating the SEP has been successfully set.
In both cases you will then Compile the program using either CRTBNDCBL or CRTCBLMOD.
- Right click on the COBOL or COBOL ILE program
- Select either Compile or Compile (Prompt)
- Select either CRTBNDCBL or CRTCBLMOD
- Right click on the newly created *pgm.cblle.
- Select either Debug (Prompt) > Batch, or Debug As > Batch
- Click OK to open the Debug Perspective.
Once the Debug Perspective is open you can step-into, step-over, monitor breakpoints
Was this topic helpful?
Document Information
Modified date:
02 August 2018
UID
swg21664093