NET/MASTER Network Control Language (NCL) Programmer's Guide
Sharing Variables to Procedures and Functions
Procedures and Functions
6–34 106160 Tandem Computers Incorporated
The following example shows how specifying the NO keyword on a procedure
declaration affects variable sharing:
zex0617n: PROCEDURE
 /* The NO keyword in a share list */
 &var_1 = One
 SAY "Pre-procedure call var_1 is "&var_1
 CALL control_proc
 SAY "Post-procedure call var_1 is "&var_1
 CALL control_proc SHARE &var_1
 SAY "Post-procedure call var_1 is "&var_1
 control_proc: PROCEDURE SHARE NO
 &var_1 = Two
 END control_proc
END zex0617n
The following screen shows the results of executing the procedure:
 (07:07) --------------------- OPERATOR CONTROL SERVICES ----------------------
 START ZEX0617N
 Pre-procedure call var_1 is One
 Post-procedure call var_1 is One
 Post-procedure call var_1 is One
 NNM1005 START ZEX0617N PROCESSING COMPLETE. NCLID 000036
 _____________________________________________________________________________
 ---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
 M=>
Since the NO keyword is specified on the CONTROL_PROC procedure declaration,
using the SHARE keyword on the CALL core statement has no effect. The value of
&VAR_1 does not change after either the first or second procedure call because the NO
keyword prevents the variable &VAR_1 from being shared to CONTROL_PROC at
both calls.










