Guardian Application Conversion Guide

Creating and Managing a High-PIN Process
Converting TAL Applications
3–26 096047 Tandem Computers Incorporated
Stopping or Abending a Process
Your existing program might call the STOP or ABEND procedure to delete a process
or process pair and to send a system message to the creator process indicating that the
deletion was caused by a normal (STOP) or abnormal (ABEND) condition:
CALL ABEND (process^id, ! Process to abend.
! stop^backup ! ,
error);
...
CALL STOP; ! Stop the calling process.
Convert the STOP or ABEND call to a call to the PROCESS_STOP_ procedure.
PROCESS_STOP_ supersedes both the STOP and ABEND procedures.
Your program can use PROCESS_STOP_ to delete itself, its backup process, or another
process. The security restrictions for deleting a process are described in the Guardian
Procedure Calls Reference Manual.
PROCESS_STOP_ requires a process handle rather than a process ID as an input
parameter to specify a process other than the calling process. To stop itself, your
program should omit the process-handle parameter or set it to a null value (-1 in each
word).
The PROCESS_STOP_
options
.<15> bit determines whether the system stops or
abends a process:
0 Stop the process. The default completion code is 0.
1 Abend the process. The default completion code is 5.
All other bits in the
options
parameter must be zero.
The system sends system message = (Process deletion) to:
The mom of the deleted process (if it exists).
The ancestor of the deleted process if the deleted process is a single named process
or if it is one process of a process pair and both members of the pair are deleted.
The job ancestor (GMOM) of the deleted process if the deleted process is part of a
batch job.
This example shows PROCESS_STOP_ used to abend a process:
! Abend the process identified by process^handle.
options := abend^option; ! Set to 1.
error := PROCESS_STOP_(process^handle,
! specifier ! ,
options); ! Value = 1 (abend).