SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-111
TASK
This mechanism allows you to use $CMON to define the rules for process creation.
For example, you can use PROCESSINFO calls to count the number of processes
a given SeeView program has running, or to assign the CPU and execution priority
of a given task.
NonStop Openers: Tasks that run NonStop should open the SeeView program
when their backup process takes over rather than use paired OPEN operations via
CHECKOPEN prior to takeover. Opening the display device at takeover is the
mechanism used by TACL.
Examples
The following example demonstrates the TASK statement.
The following example displays how the TASK … COPY statement works.
TASK fup;
TASK discs := pup STARTUP "listdev disc";
TASK e := enform VOLUME $system.public;
?MENU InfoMenu CACHEPAGES 32 { will contain fileinfo
?PROC ShowFileInfo ( #subvol )
{----------------------------}
{ Proc immediately pops up a menu on file info.
{ Note there is no wait for process response from fup.
{-----------------------------------------------------}
PARM #subvol; { Subvol to do fileinfo.
DELETE InfoMenu!; { Clear InfoMenu cache.
TASK fup; { Assert fup process.
WRITE fup,"info " { Start fup info operation
& #volsub & ".*"; { on specified subvolume.
WITH fup;
DO BEGIN { skip output until file
READ fup; { info starts to appear.
END UNTIL #TASKPROMPTING or (#TAKE #TASKDATA)="$";
TASK fup COPY InfoMenu; { Start copy to InfoMenu
BELOW; { Position below callers menu
WINDOW InfoMenu { PopUp menu without waiting
MENU "CALL InfoDetail('" & #subvol & "', #TAKE #MENUTEXT)"
SIZE 13,24;
?PROC InfoDetail ( #subvol, #file )
{---------------------------------}
{ Show Fup INFO #file, DETAIL beside callers menu
{------------------------------------------------}
PARM #subvol { subvol of file
,#file { file to do info on
;
TASK fup; { Assert Fup taskid
BESIDE; { popup window beside.
WRITE fup,"info " & #subvol & "." & #file & ",detail";
WINDOW fup CACHE LASTLINE NOFRAME NOCURSOR;
?SECT main
{---------}
LINE 4; { Show info on line 4 of pg 1.
CALL ShowFileInfo(#VOLSUB); { Note #VOLSUB is an intrinsic