NET/MASTER Network Control Language (NCL) Reference Manual

PROCEDURE
Core Statements
2–48 106126 Tandem Computers Incorporated
The following example shows how specifying the NO operand on a procedure
declaration affects the sharing of variables:
PROC3: PROCEDURE
/* The NO keyword in the procedure definition */
&VAR_3 = 1
CALL CONTROL_PROC SHARE &VAR_3
CONTROL_PROC: PROCEDURE SHARE NO
&VAR_3 = 2
END CONTROL_PROC
SAY "Value for &VAR_3 is" &VAR_3
END PROC3
In the preceding example, the call to CONTROL_PROC attempts to share the variable
&VAR_3, but the NO operand is specified on the called procedure’s PROCEDURE
core statement. &VAR_3 remains unchanged (1), on the return from
CONTROL_PROC. Whenever you use the NO operand in a procedure core statement,
you restrict all user variables to local use in that procedure.