SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-174
String Intrinsics
You can use this statement to initialize a task that has just been started or to
advise users that a task has been started. For example:
#TASKSTOPPED
returns a numeric value that indicates whether the current WITH taskid is
stopped. Zero is returned if the current WITH task is not stopped so that you can
use this intrinsic as a Boolean.
A nonzero value is returned if the current WITH task is stopped. Nonzero values
correspond to the reason for the stopped state. A -5 indicates a normal STOP
state, and -6 indicates an abnormal ABEND state.
The WITH taskid statement indicates which taskid’s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to test the state of a taskid variable prior to attempting
interprocess communication with that task by using a WRITE or READ statement
(Issuing a WRITE or READ against a stopped task results in a run-time error.) For
example:
#TASKSYMBOL
returns a string containing the symbolic name of the current WITH taskid
variable. The WITH taskid statement indicates which taskid’s attributes are
returned by the #TASK... intrinsics.
?PROC StartTacl ( TaclPage )
{--------------------------}
{ Perform TACL startup.
{
{ If TACL not previously running,
{ advise user, initialize by obeying MyInit, and show TACL window.
{-----------------------------------------------------------}
PARM TaclPage;
TASK tacl;
IF #TASKSTART THEN BEGIN
MSG "One moment, starting TACL"; { advise user on line25
PAGE TaclPage; { display tacl page
WINDOW tacl CACHE LASTLINE; { build tacl window
FLUSH; { flush output
WITH tacl;
WHILE NOT #TASKPROMPTING DO { show tacl init
BEGIN
READ tacl; { After each tacl msg
WAIT 0,REFRESH; { refresh window with msg.
END;
WRITE tacl,"Obey MyInit"; { Tacl init done, obey MyInit
END;
WITH tacl;
IF #TASKSTOPPED THEN CALL StartTacl;
WRITE tacl, #command;