SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-166
String Intrinsics
You can use this intrinsic to determine whether the cache associated with the
current WITH taskid is large enough to contain certain information. For example:
#TASKCOL
returns a numeric value representing the screen column number of the left edge of
a window on the current WITH taskid. Screen column numbers range from 1
through 80. The WITH statement indicates which taskid’s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to determine where a window is located for a given
taskid. For an example, see #TASKCACHELINE on page 9-165.
#TASKCOUNT
returns a numeric value representing the maximum number of tasks ever declared.
The intrinsic does not require a WITH statement to take effect. You can use this
intrinsic to iterate through all taskids checking for a certain condition.
For example, this example shows a menu of all taskids that have a task symbol
and a running process associated with them.
#TASKCPU
returns a string containing the CPU number of the current WITH taskid. The
WITH taskid indicates which task ID's attributes are returned by the #TASK ...
intrinsics. One use of this intrinsic is to determine the CPU of the current WITH
WITH mydata;
IF #TASKCACHEPAGES < PagesNeeded THEN
MSG "Not enough room to load data"
ELSE BEGIN
DELETE mydata!;
LOAD $vol.subvol.data , mydata;
END;
?MENU MyMenu
?PROC ShowTaskids
{----------------}
{ Display a menu of taskids that are running
{-------------------------------------}
VAR i; {note initial value is -1
DELETE MyMenu!;
FOR #TASKCOUNT DO BEGIN
WITH i:=i+1;
IF (#TASKSYMBOL<>"") AND (NOT #TASKSTOPPED) THEN
PUSH #TASKSYMBOL ONTO MyMenu;
END;
BELOW;
WITH MyMenu;
IF NOT #TASKCACHELINES THEN BEGIN
MSG(R) "No tasks to display !!";
RETURN;
END;
WINDOW MyMenu SIZE 15,#TASKCACHELINES+2;