IBM Support

How to debug a COBOL program in RDi or RDp

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:

  1. In the Remote System Explorer (RSE) view, right click on the program.

    For example, right click on:  QSYSLIB/MYLIB.LIB/QCOBOLSRC.FILE/CBLDBG2.CBLLE

  2. Select Debug (Service Entry) > Set Service Entry Point

  3. 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.

  1. Right click on the COBOL or COBOL ILE program

  2. Select either Compile or Compile (Prompt)

  3. Select either CRTBNDCBL or CRTCBLMOD

  4. Right click on the newly created *pgm.cblle.

  5. Select either Debug (Prompt) > Batch, or Debug As > Batch

  6. Click OK to open the Debug Perspective.

Once the Debug Perspective is open you can step-into, step-over, monitor breakpoints

[{"Product":{"code":"SS4QVT","label":"Rational Developer for Power Systems Software"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Compiled Language Debugger","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.5","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
02 August 2018

UID

swg21664093