COBOL Manual for TNS/E Programs (H06.03+)
Process Initiation, Communication, and
Management
HP COBOL Manual for TNS/E Programs—520347-003
31-24
Determining the Status
Determining the Status
Using the ENTER verb, a process can call the PROCESS_GETINFO_ routine to obtain
information about any process. The PROCESS_GETINFO_ routine can return any or
all of:
•
The process name, processor number, and number of the process within that
processor
•
The creator accessor ID (group ID, user ID) of the process
•
The process accessor ID (group ID, user ID) of the process
•
The execution priority at which the process is running
•
The name of the loadfile from which the process was loaded
•
The device name of the process’s home terminal
•
The system number (in a network of systems) on which the process is running
•
An error value, indicating the success of (or the nature of the failure of) the request
WATCH.
READ MESSAGE-IN-FILE.
* The READ causes the MESSAGE-SOURCE-REC to be set.
PERFORM CHECK-STATUS.
CHECK-STATUS.
MOVE SPACES TO PROCESS-NAME.
ENTER TAL "PROCESSHANDLE_DECOMPOSE_"
USING PROCESS-HANDLE
CPU
PIN
* No node number
OMITTED
* No node name
OMITTED
* No nodename length
OMITTED
PROCESS-NAME
PROCESS-NAME-LEN
GIVING ERROR-NUMBER.
IF ERROR-NUMBER EQUAL TO 0
PERFORM DISPLAY-PROCESS-NAME
ELSE
DISPLAY "ERROR " ERROR-NUMBER.
DISPLAY-PROCESS-NAME.
DISPLAY "MESSAGE WAS FROM CPU " CPU ", PIN " PIN.
IF PROCESS-NAME-LEN > 0
DISPLAY "PROCESS " PROCESS-NAME.
DISPLAY "MESSAGE CODE " SYS-MSG-CODE.
DISPLAY "MESSAGE CONTENTS: " SYS-MSG-TEXT.
Example 31-11. MESSAGE-SOURCE Clause (page 2 of 2)










