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–81
&line = COPIES( " ", &first - 1 )
/* Get numbers of days in month */
&days = &days.&month
/* Start loop to construct each display line */
DO &day = 1 TO &days
/* Add right justified day to display line and add two */
/* spaces as additional padding */
&line = &line || OVERLAY( &day, "",, 3,, R ) || " "
/* Calculate length of display line */
&linelength = &day + &first - 1
/* If length of display line is exactly divisible by 7, */
/* then output display line */
IF ( &linelength % 7 ) = 0 THEN DO
SAY &line
&line=""
&linelength=""
END /*if do*/
END /*do*/
/* Display final line, if it exists */
IF &line \== "" THEN
SAY &line
END zex0905n
Execute the ZEX0905N NCL procedure, by using the START command and observe
the results, as shown in the following screen.
(07:34) --------------------- OPERATOR CONTROL SERVICES ----------------------
DEBUG STOP ALL
NNM1947 DEBUG SESSION HAS ENDED
START OPSYS FUP DUP $DATA2.ZNCLPGN.ZEX0904N,$DATA2.ZNCLPGN.ZEX0905N
NNM1468 File Utility Program - T9074D30 - (15JUN91) System \SYS1
NNM1468 Copyright Tandem Computers Incorporated 1981, 1983, 1985-1991
NNM1456 FILES DUPLICATED: 1
NNM0999 *END*
EDIT ZEX0905N
NNM1005 START ZEDSMNUN PROCESSING COMPLETE. NCLID 000685
START ZEX0905N 02 2020
Calendar for: FEB 2020
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
NNM1005 START ZEX0905N PROCESSING COMPLETE. NCLID 000687
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
Stop The output is correct; by executing the ZEX0905N NCL procedure using other months and years you can
confirm that you have found and fixed the bug.