SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-105
TASK
object-name
specifies either an object file on disk or a process ID. Processes not declared by
the SeeView program can gain access through a taskid socket by opening the
SeeView program with: $SeeView-process-name.#taskid, for example,
$See.#Socket.
When object-name is a program object file name, that process is started with its
IN and OUT files assigned to the SeeView process ID. Subsequent execution of
the same TASK statement does not result in process creation if that process is still
running. This provides efficient sharing and reusing of processes in multiple
contexts within the SeeView environment.
If object-name specifies a process ID, the TASK statement declares a taskid for
that process name without attempting to start anything. The taskid can then be
used as an external subdevice socket into the SeeView program. If an external
process opens the SeeView program and its process name matches the process
ID declared for the taskid, that process gains access to the SeeView program
through that taskid.
If object-name is not specified and the taskid has not been previously declared,
the taskid name is assumed to be an object file on the $SYSTEM.SYSTEM
subvolume.
When you specify object, you can use filename format. For example:
TASK X := $DATA.MM.X
Or you can use a string expression. For example:
TASK X := #s or TASK X := "$DATA.MYSUB." & #s.
startup-string-exp
specifies the startup message to be written to the process started by this TASK
statement. You can specify the startup message as: TASK FUP “INFO *”or as
TASK FUP STARTUP “INFO *”.
ALLOWERROR
allows the SeeView interpreter to continue execution without reporting new
process errors that occur due to the task declaration. You can use the
#TASKERRORTYPE, #TASKERROR, #TASKPROC, and #TASKSTART intrinsics
with this option to provide programmatic recovery from TASK declaration errors.
The #TASKERROR and #TASKERRORTYPE values returned are a function of the
procedure used in the attempt to start the process. The #TASKPROC intrinsic
indicates whether NEWPROCESS or PROCESS_CREATE_ was used in the
attempt to declare the task. For example:
RUN FUP ALLOWERROR;
IF #TASKPROC = "PROCESS_CREATE_" THEN BEGIN
IF #TASKERRORTYPE=1 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";