SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-13
Task Variables
The program in Example 5-7 displays the result of the command contained in the string
variable #command in a TACL window. When you use a WINDOW statement without
the CACHE option, there is an implied wait for the process to prompt or the window to
fill with text. Using the CACHE option builds a NOWAIT window on the TACL cache.
NOFRAME causes the TACL window frame not to be redrawn if it exists, thus reducing
the amount of I/O required.
Certain TASK statement options (for example, CACHEPAGES) are meaningful only the
first time the TASK statement is successfully executed. The CACHEPAGES option
determines the size of the message cache memory associated with the user task.
Specifying an object name that is a process name rather than an object file
declares a task variable without starting a process. Use this specification both for
declaring external process window sockets and for dynamically constructing the text
that is contained in a window, such as a menu.
Other TASK statement options are meaningful only when the process is started. These
include the CPU, PRIORITY, VOLUME, and startup-message options.
Some TASK statement options, such as [:=object], COPY, TIMEOUT, and QUEUE,
have meaning every time the statement is executed.
The [:= object] option reassigns the program object name, which is either a process
ID (pid) or an object file, to the taskid. Reassignment of a taskid with a different object
name is permitted if the previously declared object is stopped. Thus, this command is
permitted:
TASK ci := tacl; STOP ci; TASK ci := comint;
For additional information on TASK statement options, see Section 9, SeeView
Statements and Script Symbols.
Example 5-7. Example of TASK Variable Usage
?PROC DoTacl ( #command )
{-----------------------}
PARM #command;
VAR width := 80; { default size of tacl window.
VAR height := 24;
TASK tacl; { If tacl was declared then reasserts it.
{ If here, tacl running; See if window exists
WITH tacl; { #TASKPAGENO intrinsic uses WITH taskid.
IF #TASKPAGENO THEN BEGIN { <> 0 implies page number with tacl window.
PAGE #TASKPAGENO; { Go to page with an existing tacl window.
LINE #TASKLINE, #TASKCOL;{ Use its current location.
LET width := #TASKWIDTH;{ And current size
LET height := #TASKHEIGHT;
END ELSE { No tacl window exists display one
BELOW; { below callers menu
WINDOW tacl,#command CACHE LASTLINE SIZE width,height NOFRAME.