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 JCL Debugging type options in the debug configuration 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.
This starts the JCLDEMO server and also prompts you to confirm the switch to the Debug perspective. Click No to stay in the Team Developer perspective.
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.