Guardian Application Conversion Guide

Converting Distributed Systems Management (DSM) Applications
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–27
Replacing a Process-ID Token
Your DSM application might extract a process-ID token from the event-message buffer
(for example, a token with token type ZSPI-TYP-CRTPID).
A Tandem subsystem usually substitutes a process-descriptor token for a process-ID
token that represents a high-PIN process. However, if it is necessary to supply also the
CPU or PIN for a named process, then the process-descriptor token is not enough. The
subsystem must supply either a token for the CPU and PIN, or a process handle token.
Convert your application to extract the new tokens.
If your application extracts a process-descriptor token, the data is suitable to display or
print. However, data in a process-handle token is not suitable to display or print. If
you extract a process-handle token, first use a procedure such as
PROCESSHANDLE_TO_FILENAME_ or PROCESSHANDLE_DECOMPOSE_ to
convert the token data to individual data items before you display or print them.
In the next TAL example, the PROCESSHANDLE_TO_FILENAME_ procedure
converts the process handle specified by
process^handle
to a process name in the
proc^name
parameter. The process name always includes the system name. It also
includes the sequence number if the
options
.<15> bit is zero (or if the
options
parameter is omitted).
error := PROCESSHANDLE_TO_FILENAME_(process^handle,
proc^name:pn^max^len,
proc^name^length,
options);
In this TAL example, the PROCESSHANDLE_DECOMPOSE_ procedure returns the
parts of the process handle specified by
process^handle
:
error := PROCESSHANDLE_DECOMPOSE_(process^handle,
cpu^number,
pin,
system^number,
system^name:sn^max^len,
system^name^length,
process^name:pn^max^len,
process^name^length,
seq^number);