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 Solution Explorer to open them.
  2. Introduce breakpoints in both files: right-click on a line in the Procedure Division and click Breakpoint > Insert 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 Debug > Start Debugging or press F5.

    The debugger enters a wait state.

  4. Submit the JCL file. The debugger stops in your JCLCreate program at the breakpoint.
  5. 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.
  6. Once you’ve completed your debug session, select Debug > Stop Debugging.

Notice the messages that have appeared in the Output window.

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 Debug tab of the project properties.

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