NET/MASTER Network Control Language (NCL) Programmer's Guide
Displaying Decompiled Source Code
Debugging an NCL Process
106160 Tandem Computers Incorporated 9–37
Displaying Multiple
Statements
When displaying multiple statements, you can display:
All statements, including statements at all lower nesting levels
Multiple statements in a certain direction
Multiple statements at a certain nesting level
Displaying All Statements
To display all statements, use both the NESTED=YES and LOC operands of the
DEBUG SOURCE command, as the following screen shows:
(15:05) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0902N THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
NNM1060 PROCEDURE ZEX0902N NCLID 1083 PAUSED
DEBUG START ID=1083
NNM1901 NCL 001083 DEBUG SESSION INITIATED
NNM1902 NCL 001083 SUSPENDED AT ZEX0902N.8 LINE 22
GO ID=1083 Y
DEBUG SOURCE NESTED=YES LOC=ZEX0902N
NNM1926 NCL 001083 LINE# SMT EV ON STMT-TEXT FROM ZEX0902N
NNM1934 NCL 001083 PROCEDURE ZEX0902N
NNM1927 NCL 001083 1 1 0 0 ZEX0902N: PROCEDURE EXTPARSE SIMPLE
NNM1927 NCL 001083 15 2 0 0 IF &SYS.PARMCNT=0
NNM1927 NCL 001083 15 3 1 0 THEN DO
NNM1927 NCL 001083 16 4 2 0 SAY "You must enter at least one word"
NNM1927 NCL 001083 17 5 2 0 EXIT
NNM1927 NCL 001083 18 6 2 0 END
NNM1927 NCL 001083 21 7 0 0 CMDLINE "GO ID="||&SYS.NCLID||" _Y"
NNM1927 NCL 001083 22 8 0 0 PAUSE VARS=( &PAUSE )
NNM1927 NCL 001083 23 9 0 0 IF SUBSTR( UPPER( &PAUSE ), 1, 1 )\=="Y"
NNM1927 NCL 001083 24 10 3 0 THEN EXIT
NNM1927 NCL 001083 26 11 0 0 &CHARS. = "0"
NNM1927 NCL 001083 28 12 0 0 DO &I = 1 TO &SYS.PARMCNT BY 1
AUTO HOLD ------------------ NonStop NET/MASTER D30 ---------------- --------
PM=>
In this example, the ZEX0902N NCL procedure is executed. The DEBUG START
command starts a debug session. The GO command resumes execution of the paused
NCL process. The DEBUG SOURCE command displays all statements in all nesting
levels in the ZEX0902N NCL process from the top-level procedure: ZEX0902N.
Specifying NESTED=YES ensures that all decompiled source code from lower nesting
levels are displayed. Specifying LOC with the name of the top-level procedure,
ZEX0902N, ensures that all nesting levels below the top level are included in the
display.