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

Getting Started With NCL Procedures
An NCL Tutorial
3–18 106160 Tandem Computers Incorporated
Features of HELLO1 Now that you have successfully executed your first NCL procedure, it is instructive to
look at some of its features.
The File Name—HELLO1
HELLO1 is the name of a TEDIT file containing NCL statements. It is called the NCL
procedure source file name.
It is also the name of the external procedure you have just created. An external name
is the name used by other source files to refer to an NCL procedure. The Edit Services
selection list screen shows the name of the NCL procedure you have just created under
the heading Filename.
The HELLO_WORLD: Label
HELLO_WORLD: at the beginning of the NCL procedure is called a label. It labels an
internal procedure. An internal name is the name used from within a source file to
refer to an NCL procedure. Labels are normally used as the target of other statements
such as CALL, GOSUB, and SIGNAL LABEL. The last character of a label in this
context must be a colon (:).
The PROCEDURE Core Statement
PROCEDURE is a core statement. It marks the beginning of the NCL procedure. It is
used to explicitly declare an NCL procedure. Every PROCEDURE statement must
have a corresponding END statement that terminates the NCL procedure declaration.
The SAY Core Statement
SAY is a core statement. It must be followed by an expression. In this example, the
expression is “hello, world.” SAY displays the expression on an OCS screen.
The Quoted String—“hello, world”
“hello, world” is a lexical element called a quoted string. The characters between the
opening and closing quotes of a quoted string are constant. They do not change
during the execution of an NCL process.
The END Core Statement
END is a core statement. It marks the end of the NCL procedure. Every PROCEDURE
statement must have a matching END statement.
The HELLO_WORLD Label
HELLO_WORLD at the end of the NCL procedure is a label. Including it after the
END core statement is not required but is good practice. It lets the compiler check that
the label at the end of the NCL procedure matches the label at the beginning of the
NCL procedure. When a label follows END, it is not followed by a colon (:).