SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-85
READ
Example
This example shows the PUSH and POP statements.
READ
The READ statement reads data from a user task or a cache associated with a user
task.
taskid
specifies the taskid of the task to be read. (For information regarding taskids, see
the TASK statement.)
*
causes the CACHE option to access the SeeView message cache rather than a
taskid cache. The asterisk option requires the use of the CACHE option.
PEEROK
indicates that the READ can complete when any peer task associated with the
specified taskid writes a message to the SeeView program. Peer tasks are all
tasks that have the same $SeeView-process-name #taskid subdevice
opened.
?SECTION qpush
{-------------}
{ Build a cache "q" of pup listdev info, and present window on data
{----------------------------------------------------------------}
VAR #s,eof,row,col;
TASK pup :=pup;
TASK q :=$null;
DELETE q!;
WRITE pup,"listdev disc"; {do a listdev
PUSH "Current Disc Process 'active' Paths" ONTO q; {push heading
PUSH "" ONTO q; {skip a line
DO BEGIN
READ pup,#s,eof;
IF #s[20]="*" THEN PUSH #time & #s[1:50] ONTO q; {push *'ed lines
END UNTIL eof;
PAGE 1; CLEAR; {display result
WINDOW q CACHE; {in window.
?SECTION qpop
{-----------}
{ Display data from a taskid's cache on terminal page 2.
{------------------------------------------------------}
LET row:=-1; LET col:=0;
PAGE 2; CLEAR;
DO BEGIN {display Q data
POP #s FROM q; {"outside" of
PLOT 0,(row:=row+1); {a window
"" & #s;
END UNTIL (#s="") OR (row>22);
READ taskid |*[PEEROK|CACHE index] [,[read-count ] [,error] ]
[,[#string-var] ]