NET/MASTER Network Control Language (NCL) Programmer's Guide

Sharing Variables to Procedures and Functions
Procedures and Functions
6–40 106160 Tandem Computers Incorporated
The following screen shows the results of executing the procedure:
(13:46) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0620N
Pre-procedure call vars are One 1 First Begin
Post-procedure call vars are One 1 First Begin
Post-procedure call vars are One 1 First End
NNM1005 START ZEX0620N PROCESSING COMPLETE. NCLID 001146
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The default is no variable sharing (CONTROL NOSHRVARS) and so no variables are
shared on the first procedure call. The second procedure call overrides the setting of
the CONTROL verb by specifying a list of variables to not share, &VAR_1 and
&VAR_2. The CONTROL_PROC procedure declaration also specifies a list of
variables not to share, &VAR_2 and &VAR_3. The variable excluded by these
NOSHARE lists is &VAR_4. Accordingly, &VAR_4 is the only variable that is
changed.
The following table summarizes the interaction between the NOSHARE keyword on
the second procedure call and the NOSHARE keyword on the procedure declaration:
All Available Variables
Variables Shared by
Second Procedure
Call
Variables Shared by
Control Procedure
Declaration
Result of Variable
Sharing Interaction
&VAR_1 No Yes No
&VAR_2 No No No
&VAR_3 Yes No No
&VAR_4 Yes Yes Yes
This table shows that, in a finite set of variables (the set is &VAR_1, &VAR_2,
&VAR_3, and &VAR_4), not sharing a subset (&VAR_1, &VAR_2, and &VAR_3) is the
same as sharing the remainder (&VAR_4).