SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-86
READ
Without this option, the SeeView program waits specifically for a message from
only the specified taskid.
When you use PEEROK, use the intrinsic #TASKIDLASTREAD to determine the
actual taskid of the peer task that caused the READ statement to complete.
CACHE index
specifies that data is moved from the cache associated with the taskid rather
than being read from the task in real time.
index
specifies the ordinal record index in the cache. CACHE indexes 0, 1, 2, …,
correspond to the first, second, third, …, records in cache. Indexes -1,-2,-3, …,
correspond to the last, second from last, third from last, …, records in cache.
read-count
transfers the data read from the taskid to the current screen buffer address.
error
specifies that the result of the READ statement is programmatically determined by
setting an integer variable to one of these values:
#string-var
transfers data to the string variable rather than to the screen.
Example
This example shows the READ statement.
0 if data was read without an error.
1 if the task is prompting for input, or an end-of-file is encountered when
using the CACHE option.
40 if a read timeout occurred. (See the TIMEOUT option of the TASK
statement.)
-5 if the task has stopped.
-6 if the task has ended abnormally (abended).
VAR #s;
TASK f:=fup;
WRITE f,"copy xyz";
WITH f;
DO BEGIN
READ f,#s;
IF (NOT #taskprompting) AND (#TAKE #s)="MYDATA" THEN BEGIN
[#s]; { show all records starting with the word MYDATA
END;
END UNTIL #TASKPROMPTING;