NET/MASTER Network Control Language (NCL) Programmer's Guide

Debugging an NCL Process From Start to Finish
Debugging an NCL Process
106160 Tandem Computers Incorporated 9–75
Step 9
Display the source code at statement 47, by using the DEBUG SOURCE command, as
shown in the following screen.
Display the values of the variables used to draw the calendar, by using the DEBUG
DISPLAY command, as shown in the following screen. The following table analyzes
the current values of the variables used to draw the calendar:
Variable Value Comment
&DAY 2 Seems correct; it is the second pass through the DO loop.
&DAYS 29 Seems correct.
&FIRST 7 Seems correct.
&LINE “ 2 ” Seems correct; it is the first part of the next display line.
&LINELENGTH 35 Is not correct; the length of &LINE is five characters, not 35;
the value of &LINELENGTH should be 5.
Stop Why is the value of &LINELENGTH incorrect? The value of this variable is determined by the value of
&DAYS, which is a constant (29), and &FIRST, which is a constant (7). Either the use or the value of one
or both of &DAYS or &FIRST variables is incorrect. The value of &FIRST is clearly correct; what is wrong
with &DAYS?
Modify the value of &LINELENGTH, by using the DEBUG MODIFY command, to the
length of &LINE—the length of the line is currently five characters—as shown in the
following screen.
Display the modified value of &LINELENGTH, by using the DEBUG MODIFY
command, as shown in the following screen.
Clear breakpoint 2 (at statement 44), by using the DEBUG CLEAR command, as
shown in the following screen. It appears this breakpoint is no longer required.