GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-82
^TERMINATE
is the TCB number of a task, a value from 1 through the value of MAXTASKS.
Tasks 0 and 1 are always the monitor and listener system tasks.
Example
This code may be used to scan the TCB pool:
t1 := 2; !We start at 2 because tcb[0] & tcb[1] are always
!system tasks
WHILE (t1 <= MAXTSKS) do
BEGIN
tcb^addr := TCBADDR(t1);
.
Do desired processing here
.
t1 := t1 + 1
END;
^TERMINATE
This procedure stops the primary and backup GDSX processes without waiting for
outstanding task I/Os from or to external openers to be completed and without waiting
for external openers to be closed.
When this procedure is called, all active LINEs and SUs are queried to determine
whether they have external openers. If no external openers exist, the primary and
backup GDSX processes are stopped after an EMS event message is generated
indicating that the GDSX process was terminated by you. The message is as follows:
STATUS *1005* GDS USER TERMINATED
If there are external openers when this procedure is called, an error 66 is returned to
all the openers, indicating that the “device“ has been downed. Then the preceding
EMS message is generated, and the primary and backup GDSX processes are
stopped.
Considerations
A call to ^TERMINATE is the same as issuing the SCF STOP command with an
exclamation point:
STOP PROCESS $GDSX-process-name !
A call to ^SHUTDOWN is the same as issuing the following SCF STOP command:
STOP PROCESS $GDSX-process-name
Note. Specifying a task-number value less than 1 or greater than the value of MAXTASKS
causes the current task to fault with an EMS message.
CALL ^TERMINATE