Previous Topic Next topic Print topic


Start debugging

Debugging requires no changes to your program code. It requires that your project is associated with the JCLDEMO Enterprise Server and that the Enterprise Server is configured to enable dynamic debugging, which you performed in the previous steps.

  1. Double-click the JCLRead.cbl and JCLCreate.cbl files in Team Developer Tree view to open them.
  2. Introduce breakpoints in both files: right-click on a line in the Procedure Division and double-click in the left margin to insert a breakpoint.

    For example, in JCLRead.cbl, set a breakpoint on the line for OPEN INPUT INFILE. In JCLCreate.cbl. set a breakpoint for the line for OPEN OUTPUT OUTFILE.

  3. Choose Run > Debug or press F11.
  4. Click JCL on COBOL Enterprise Server in the Debug As dialog box, and click OK.

    This starts the JCLDEMO server and also prompts you to confirm the switch to the Debug perspective. Click Yes to switch to the Debug perspecive.

  5. Submit the JCL file. (You will need to switch from the Debug Perspective in the IDE to the Team Developer Perspective to do this.) The debugger stops in your JCLCreate program at the breakpoint.
  6. Step through a few lines and press F5 to continue.
    The debugger should stop again in the JCLRead program.
    Tip: If you want to view the list of attached debuggers, work through the next topic before performing the next step.
  7. Once you’ve completed your debug session, select Run > Terminate.

Notice the messages that have appeared in the Console.

The debugger offers you a number of choices when specifying what you want to debug. You may choose a Job Name, a Job Number, a Step Name or the top-level program on the JCL Debugging type options in the debug configuration.

These choices enable you to perform remote debugging, to support multiple users debugging on the same region.

In this tutorial you’re running Enterprise Server locally and no one else is connecting to it, so you do not need to specify any options and the debugger debugs any debuggable program that it finds.

Previous Topic Next topic Print topic