NET/MASTER Network Control Language (NCL) Programmer's Guide
The Structure of an NCL Procedure
Initial NCL Procedure Development
106160 Tandem Computers Incorporated 4–3
Statements Lines in an NCL procedure can contain one or more statements. Statements are
instructions that are interpreted by NCL according to the initial keyword.
There is a clear distinction in NCL between statements, core statements and verbs.
The term statement refers to lines of code within an NCL procedure. Core statements
and verbs are particular types of statements.
One statement can consist of:
One core statement
One verb
Multiple variables
Multiple built-in functions
Multiple expressions
The initial keyword in a statement determines its type. It determines the action(s), if
any, that a statement performs. For example, core statements such as IF, DO, and
SELECT and verbs such as CMDLINE, FILE DEL, and LOCK perform an action. The
NOP core statement performs no action.
Statements are terminated by an explicit or implicit statement terminator. The explicit
statement terminator is a semicolon (;). You can include more than one statement on a
line by terminating a preceding statement with an explicit statement terminator. If a
line does not end with an explicit statement terminator, the terminator is normally
assumed.
The following example shows three statements. Each statement is on a different line.
The first statement is terminated by an explicit statement terminator, the second by an
implicit statement terminator, and the third by an explicit statement terminator.
CONTROL NOCMD; /* Explicit statement terminator used */
CONTROL NOENDMSG /* Implicit statement terminator used */
CONTROL RNGLIM; /* Explicit statement terminator used */
The following example shows the same three statements separated by explicit
statement terminators on the same line:
CONTROL NOCMD; CONTROL NOENDMSG; CONTROL RNGLIM;
Refer to the discussion on compiler operation in the NonStop NET/MASTER NCL
Reference Manual for the rules governing the use of the statement terminator.
Hint To improve the performance of an NCL process, use the fewest number of statements possible in an NCL
procedure.