GDSX Manual
Service Routines
Extended General Device Support (GDSX) Manual–134303
8-52
^PROCESS_CREATE_
•
For the purpose of editing input data, it may be desirable to read disk files within
GDSX. Because the maximum nowait depth for disk files is 1, at most one nowait
I/O can be in process on a single open of a disk file. Multiple tasks use a semaphore
to control access to the publicly opened file in this example:
INT
DISKFILE,
.DISKSEM[0:3],
.DISKNAME[0:11];
.
PROC USER^INITIALIZE(PRIMARY);
INT PRIMARY;
BEGIN
DISKSEM[0] := DISKSEM[1] := DISKSEM[2] := 0;
CALL INIT^SEM(DISKSEM);
IF PRIMARY THEN
BEGIN
DISKNAME ':=' ["$XYZ SOME FILE "];
CALL ^OPEN(DISKNAME, DISKFILE, ...);
IF < THEN
BEGIN
.
produce suitable error message
.
CALL ^TERMINATE;!Stop GDSX process
END;
END;
END;
^PROCESS_CREATE_
This procedure creates a new process in a waited or nowait manner, and, optionally,
assigns a symbolic process name to it. Having users call the TSCODE-supported
^PROCESS_CREATE_ procedure rather than the Guardian PROCESS_CREATE_
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 unconverted, the USCODE tasks cannot call this procedure.
Unconverted USCODE must instead call ^NEWPROCESS, the equivalent C-series
service routine. If a task within an unconverted application calls this procedure, file-
system error 29 or 560 is returned.
Except for the following considerations, the syntax, condition code settings, and
considerations regarding this procedure are the same as the PROCESS_CREATE_
procedure in the Guardian Procedure Calls Reference Manual.
Considerations
•
Calling ^PROCESS_CREATE_ in a nowaited mode causes the calling task to be
suspended. Nowaited calls are supported only when creating processes on the same
node.