GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-49
^NEWPROCESS
name in the dcb^template or the lcb^template, depending on whether the calling task
is a DEVICE^HANDLER task or LINE^HANDLER task, respectively.
filenum output
INT:ref
is the number of the file to which the calling task is associated. This is drawn from
the variable term in tcb^template, and is the same as the terminal file number or the
LINE file number for a DEVICE^HANDLER task or LINE^HANDLER task,
respectively.
^NEWPROCESS
This procedure is used by any GDSX task to create a new process, and optionally, to
assign a symbolic process name to the process. Having USCODE call the TSCODE-
supported ^NEWPROCESS procedure rather than the Guardian NEWPROCESS allows
GDSX to maintain a table (PCBTBL) of processes for which it is the creator. By means
of this table, stop or abend system messages received by TSCODE can be routed to the
task that created the process being stopped.
If USCODE is converted, TSCODE tracks its created processes with process handles,
and so USCODE tasks cannot call this procedure. If a task within a converted
application calls this procedure, file-system error 29 or 560 is returned. Converted
USCODE must instead call ^CREATE_PROCESS_, the equivalent D-series service
routine.
Except for the following considerations, the syntax, condition code settings, and
considerations regarding this procedure are the same as the counterpart in the Guardian
Procedure Calls Reference Manual.
Considerations
^NEWPROCESS is a waited operation. ^NEWPROCESS cannot be called in a
nowaited mode.
Because the working stack images of tasks are swapped to and from an extended
data segment during I/O operations, I/O must be performed to and from global
buffers.
The name, priority, and processor parameters are required. The Guardian jobid and
errinfo parameters are not supported.
The MAXPROCESSES configuration parameter specifies the maximum number of
processes that can be active simultaneously as a result of GDSX ^NEWPROCESS
calls. (MAXPROCESSES is used to determine the size of the PCB table.) If the
GDSX process is to run as a process pair, then MAXPROCESSES must be at least 1
to allow for the creation of the backup process.
If a USCODE task calls ^NEWPROCESS, and the created process stops, abends, or
is lost due to CPU failure, TSCODE receives a stop, abend, or CPU fail system
message (type -5, -6, or -2). If sysmsgs^flag of the CONTROLFLAGS
configuration parameter is set to 1, TSCODE forwards the system message to the