SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-139
WRITEREAD
•
Third example:
WRITEREAD
The WRITEREAD statement writes a string to the SeeView terminal and returns the
read result in a string variable.
write-string
specifies a string expression indicating the string that is written to the SeeView
terminal #TERMFILENAME. If you do not specify write-string, the
WRITEREAD operation becomes a simple terminal READ operation.
string-var
specifies a string variable to contain the terminal response from the write-
string.
error-var
specifies an integer variable name to contain the file-system error resulting from
the WRITEREAD operation.
?PROC GuiServer ( #op, gui)
{-------------------------}
{ This proc performs the operation contained in
{ #op and replys the entire response to the requestor.
{----------------------------------------------------}
PARM #op { #op = <ci-name> <command>
, gui { taskid of gui requestor
;
VAR #ci := #TAKE #op { command interpreter name
,#cmd := #DROP #op { command to do
;
EXECUTE "TASK " & #ci; { declare requested ci
EXECUTE "WITH " & #ci; { get WITH ci taskid
DELETE #taskid !; { clear cache contents
WRITE #taskid,#cmd; { perform command
WRITE #taskid,""; { wait for response
WRITE gui,"" { reply with cache
FROM #taskid; { from requested ci
?SECT main
{---------}
{ This section loops processing $RECEIVE requests
{------------------------------------------------}
VAR #op; { Server Request
TASK gui := $xxx TIMEOUT 3600,3600; { Timeout in 1 hour
WHILE 1 DO BEGIN { Loop
READ gui PEEROK, #op; { read gui request
CALL GuiServer ( #op, #TASKIDLASTREAD); { process request
END; {
WRITEREAD [write-string ] , string-var [, error-var ]