The IDE enables you to debug a job running on an enterprise server, either locally or remotely.
It is not possible to debug the JCL file itself, but you can debug the COBOL programs that are invoked by the job (that is, EXEC PGM=COBOL-prog-name). Breakpoints within these invoked programs are honored in the same way as when debugged locally.
You can also set breakpoints on the JCL, at project level: specify a job name, a job number, a step name or the top-level program on the Debug tab of the project properties and execution breaks at the first available point after the criteria is met. These choices are useful when performing remote debugging, and support multiple users debugging on the same region.
In this section, we will set the breakpoints directly in the COBOL code, on the enterprise server we created locally. See the links at the bottom of the page for further reading on enabling some of the other functionality.
COBOL File | Breakpoint Code |
---|---|
JCLCREAT.cbl | OPEN OUTPUT OUTFILE |
JCLREAD.cbl | OPEN INPUT INFILE |
Place your cursor in the far-left column on the line containing the breakpoint code, and double-click to set the breakpoint.
The debugger enters a wait state.
The debugger stops in your JCLCREAT program at the breakpoint.
The debugger stops again at the breakpoint in the JCLREAD program.
This concludes the tutorial.