Guardian Application Conversion Guide

Creating and Managing a High-PIN Process
Converting TAL Applications
3–18 096047 Tandem Computers Incorporated
System-Generated Name Without Using PROCESSNAME_CREATE_
To have the system generate a name for a new process, follow these steps:
1. Set the
name^option
parameter to the LITERAL
ZSYS^VAL^PCREATEOPT^NAMEDBYSYS.
2. Omit the
name
parameter, or set the
name^length
parameter to zero.
3. Set any other PROCESS_CREATE_ parameters as needed and call the procedure.
4. Check the results as follows:
For a process created in a waited manner, the system returns a process
descriptor and its length in the
process^desc
and
process^desc^length
output parameters.
For a process created in a nowait manner, the system returns a process
descriptor in the system message -102. Read this message from $RECEIVE
using the READ or READUPDATE procedure.
In this example, PROCESS_CREATE_ creates a high-PIN process in a waited manner.
The system-supplied name is returned in the process^desc parameter:
name^option := ZSYS^VAL^PCREATEOPT^NAMEDBYSYS;
max^length := ZSYS^VAL^LEN^PROCESSDESCR;
error := PROCESS_CREATE_(program^file:pf^length,
! library^file:lf^length ! ,
! swapfile:sf^length ! ,
! ext^swapfile:esf^length ! ,
priority,
cpu^number,
process^handle,
error^detail,
name^option,
! proc^name:proc^name^length ! ,
process^desc:max^length,
process^desc^length);