Guardian Application Conversion Guide
Using Terminal I/O Operations
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–15
Displaying Information About a Process
Your existing program might display or print information about a process using a
process ID to identify the process.
In D-series procedures, the process handle replaces the process ID. However, a
process handle is not suitable to display or print. To convert a process handle to a
process string that is suitable to display or print, use the
PROCESSHANDLE_TO_STRING_ procedure:
error := PROCESSHANDLE_TO_STRING_(process^handle,
string:max^length,
string^length);
In the previous example, PROCESSHANDLE_TO_STRING_ returns a process string in
the
string
parameter. The format of the string is:
[\
node-name
.]
{}
name
cpu,pin
The process string includes the node (or system) name only if the process is running
on a remote node. You can also use the PROCESSHANDLE_DECOMPOSE_
procedure to return the individual parts of a process handle to display or print. For
example:
error := PROCESSHANDLE_DECOMPOSE_
(process^handle,
cpu,
pin,
system^number,
system^name:max^sn^len,
system^name^length,
process^name:max^pn^length,
process^name^length,
seq^no);
Getting Information About a Process
Your existing program might call one of these procedures to get information about one
or more processes:
CREATORACCESSID MYTERM
GETCPCBINFO PRIORITY
GETCRTPID PROCESSFILESECURITY
GETREMOTECRTPID PROCESSINFO
LOOKUPPROCESSNAME PROCESSTIME
MOM or MYGMOM PROGRAMFILENAME
For information about converting these procedures, refer to “Getting Information
About a High-PIN Process” in Section 3, “Converting TAL Applications.”