SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-169
String Intrinsics
#TASKERROR depend on which procedure was used to launch the process. For
info on error codes returned, see the GUARDIAN Procedure Calls
PROCESS_CREATE_ and NEWPROCESS. You use the #TASKERRORTYPE
intrinsic to programmatically determine if a TASK statement executed successfully.
For example:
#TASKHEIGHT
returns a numeric value representing the height of a window on the current WITH
taskid. The WITH statement indicates which taskid’s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to determine the size of a window for a given taskid. For
an example, see #TASKCACHELINE on page 9-165.
#TASKID
returns a numeric value representing the taskid number of the current WITH
taskid. The WITH statement indicates which taskid’s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to write general code when it is desirable to not be
concerned with the current taskid variable name. For example:
#TASKIDLASTREAD
returns a numeric value representing the taskid number of the task that responded
to the last READ statement. The intrinsic is not a function of the WITH statement.
You can use this intrinsic to determine the actual taskid number of the task that
completed a READ statement when the PEEROK option is used. For example:
VAR #program := "$SYSTEM.SYSTEM.SQLCI";
TASK x:=#program ALLOWERROR;
IF #TASKERRORTYPE THEN BEGIN { task not started, had error
CALL ErrorHandler( #program, #TASKERRORTYPE, #TASKERROR );
RETURN;
END;
WITH x; { From here on no reference is made to variable x.
PAGE #TASKPAGENO;
LINE #TASKLINE, #TASKCOL;
WINDOW #TASKID SIZE #TASKWIDTH, #TASKHEIGHT;
TASK socket := $null; { Socket can be multiple processes.
READ socket PEEROK, #cmd; { PEEROK taskid may not = "socket".
WITH #TASKIDLASTREAD; { Intrinsic returns actual taskid.
IF #TASKxxxxx THEN { Now WITH actual taskid of the
.. { last read statement completion.