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 JCLCREAT.cbl files in the jcl project, from Solution Explorer, to open them.
  2. Introduce breakpoints in both files:

    On a line in the Procedure Division, right-click and select Breakpoint > Insert Breakpoint to insert a breakpoint.

    For example, in JCLREAD.cbl, set a breakpoint on the line for OPEN INPUT INFILE. In JCLCREAT.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 JCLCREAT 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.