SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-37
DO
DO
The DO statement performs iteration until the numeric value of an expression is
nonzero.
statement
represents the SeeView statement that is to be reiteratively performed.
You can use a BEGIN term, followed by multiple statements and an END term, to
delimit a compound statement for execution. Nested statements are allowed.
UNTIL expression
specifies the expression that is to be evaluated after each iteration to determine
whether another iteration is to be performed: Reiterate statement if expression
is zero. Stop looping if expression is nonzero.
Example
This example shows a DO statement that iterates a compound statement:
DO statement UNTIL expression ;
?MENU systems
?PROC ShowNodes
{--------------}
{ This proc loads the "systems" menu
{ with network node numbers and names.
{------------------------------------}
VAR #s, #sysno;
TASK netmon;
WRITE netmon,"CPUS";
DELETE systems!;{ Cleanup systems menu
WITH netmon; { To use #taskprompting
DO BEGIN { Read until prompting
READ netmon,#s;
#sysno := #TAKE #s;
IF #NUMERIC #sysno THEN
BEGIN { #s contains system info
PUSH #s ONTO systems;
END;
END UNTIL #TASKPROMPTING;
WINDOW systems CACHE;