To debug In Eclipse, you create a debug configuration from which you launch a debug session.
Another dialog box is also displayed, prompting you to switch to the Debug perspective.
The JCL is submitted to the PLIDEMO server, and debugging starts. The debugger pauses at the following line: OPDEMO: PROC(JCLPARM) OPTIONS(MAIN) REORDER;.
or press
F5 to step into the program. This takes you to line 77 that reads:
on error begin;
The line appears in the Breakpoints pane in the top right part of the Debug perspective.
several more times until you get to the line that reads:
SYSPRINT_BUFF = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' || /* 26 */
SYSPRINT_BUFF and its current value appear in the Expressions pane.
and see how the value of
SYSPRINT_BUFF changes to
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ12.
a few more times until you reach the line that reads:
sysin_num_recs = '0';
This line initiates the SYSIN_NUM_RECS variable.
and check the value of
SYSIN_NUM_RECS in the
Expressions pane. It has changed to
0000.
a few more times until you reach the line that reads:
sysin_num_recs = sysin_num_recs + 1;
(or
CTRL+R) to run the program to that line.
When the debugger reaches the END statement, you can see from the final value of SYSIN_NUM_RECS (0004) that the program has processed five records.
Debugging ends automatically when the program is done running.
.
This concludes the tutorial.