NET/MASTER Network Control Language (NCL) Reference Manual
FLUSH
Core Statements
2–18 106126 Tandem Computers Incorporated
FLUSH The FLUSH core statement immediately terminates an NCL process. This statement
flushes all nested levels in the process and acts as an unconditional end. Processing
returns to the initiator of the process.
A process can consist of one or more executable procedures. You can have nested calls
to different procedures at various levels within a process; however, only one of the
procedures within the process can be executing at any one time. If you only want to
terminate a procedure to return to a previous nesting level, you should use the EXIT
core statement.
You cannot trap the FLUSH core statement with either the ERROR or FLUSH_ERROR
error handler. For more information on the FLUSH core statement, refer to the
NonStop NET/MASTER NCL Programmer's Guide.
FLUSH
Considerations
See the QEXIT verb in Section 3, “Verbs.” This verb terminates an OCS window in
which an NCL process is executing. When you terminate a window in OCS, you
terminate all processes associated with that window.
See EXIT, LEAVE, and RETURN. These core statements describe other methods of
exiting procedures, DO groups, and functions.
Example
The following NCL process is terminated using the FLUSH core statement, after a call
to an internal NCL procedure called CALLEX:
EXAMPL: PROCEDURE
&A = 20
CALL CALLEX SHARE &A
SAY "&SYS.RETCODE = " &SYS.RETCODE
/* NOW FINISH EVERYTHING */
FLUSH
CALLEX: PROCEDURE
/* JUST RETURN AFTER THE CALL */
EXIT &A
END CALLEX
END EXAMPL