SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-118
WHILE
DO statement
specifies any valid SeeView statement, including a compound statement.
Considerations
You can use a BEGIN term, followed by multiple statements and an END term, to
delimit compound statements for execution. You can use nested statements.
Example
This example shows how to use the WHILE statement.
?MENU Nodes
?PROC ShowNodeNames
{------------------}
{ Display menu of network node names
{-----------------------------------}
VAR #s { output from netmon
,#sysno { system number
, i { system name column index
;
TASK netmon;
WRITE netmon,"cpus";
DELETE nodes!;
WITH netmon;
WHILE (NOT #TASKPROMPTING) DO BEGIN
READ netmon,#s;
#sysno := #TAKE #s;
IF #NUMERIC #sysno THEN BEGIN { have sysno
SCAN #s until "\" ->i;
IF i THEN BEGIN { have sysname
PUSH #s[i+1:132] ONTO nodes;
END;
END;
END;
LINE 4;
WINDOW nodes MENU "CALL ShowPaths(#TAKE #MENUTEXT)"
SIZE 12,24 PAGES;
?PROC ShowPaths( #sys )
{---------------------}
{ Show PATHS for #sys
{---------------------}
PARM #sys; { #sys name w/o \
TASK netmon;
BESIDE;
WINDOW netmon,"paths \" & #sys
CACHE LASTLINE NOFRAME NOCURSOR;
?SECT main
{---------}
CALL ShowNodeNames;