NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.VARCNT
System Variables
5–106 106126 Tandem Computers Incorporated
&SYS.VARCNT The &SYS.VARCNT system variable contains the number of variables created or
modified by the last NCL verb that used generic processing. A number of NCL verbs
are capable of generating one or more variables necessary to hold data that results
from the verb’s operation. An NCL procedure can use this system variable to
determine how many variables have been created, as shown in the following example.
&SYS.VARCNT
Example
The following example uses the &SYS.VARCNT system variable in two different
ways:
VARCNT: PROCEDURE
DO FOREVER
INTREAD ARGS TYPE=ANY
SAY " THE NUMBER OF VARIABLES CREATED BY INTREAD IS ",
&SYS.VARCNT
INTREAD VARS=&WORD* TYPE=ANY
DO &I = 1 TO &SYS.VARCNT
SAY "WORD "&I" OF TEXT IS " &WORD&I
END
END
END VARCNT