NET/MASTER Network Control Language (NCL) Reference Manual
END
Core Statements
2–16 106126 Tandem Computers Incorporated
END The END core statement ends a DO group, or a FUNCTION, PROCEDURE, or
SELECT statement.
Omitting an END statement after a DO group, or after a FUNCTION, PROCEDURE,
or SELECT statement, generates a compilation error. Specifying a label name with the
END statement is optional; if used, the label must be identical to the label name of the
core statement it ends.
END [
label
]
label
contains the label preceding the DO group, or preceding the FUNCTION,
PROCEDURE, or SELECT core statements, without the final colon (:). The
compiler checks this label for correct statement/END pairing.
See Section 8, “Compiler Operation,” for the definition of an NCL label.
Considerations
An END statement acts as an implied EXIT. Unlike EXIT, it cannot return a value
in &SYS.RETCODE. See the EXIT core statement in this section.
See DO, FUNCTION, PROCEDURE, and SELECT. These core statements all use
END.
Examples
The following example ends a procedure called PROC1:
PROC1: PROCEDURE
…
/* NCL statements */
…
END PROC1
The following example shows how to end a procedure if you do not want to use a
label:
PROC2: PROCEDURE
…
/* NCL STATEMENTS */
…
END