Guardian Procedure Calls Reference Manual

Considerations
Where to find the system number
The system number for a particular system whose name is known can be obtained from the
LOCATESYSTEM procedure.
Equivalencing the two words of status
The two words of status can be separated by the usual technique of equivalencing INT
variables to the high- and low-order words. For example, a Tandem Application Language
procedure that calls REMOTEPROCESSORSTATUS might contain these declarations:
INT(32) STATUS;
INT NUM^PROCESSORS = STATUS; ! high-order word.
INT BIT^MASK = NUM^PROCESSORS + 1; ! low-order word.
For an explanation of equivalenced variables, see the TAL Reference Manual.
Low-order word of status
The bits in the low-order word are ordered from 0 to 15, from left to right (the processor
number corresponds to the bit number):
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Bits
Word[1]Low-order word
Using status for local processors
REMOTEPROCESSORSTATUS can also be used to obtain the status of local processors:
INT(32) MY^PROCESSOR^STATUS;
MY^PROCESSOR^STATUS := REMOTEPROCESSORSTATUS ( MYSYSTEMNUMBER );
Caution using status for network process recovery
Using REMOTEPROCESSORSTATUS for network process recovery can lead to peculiar timing
problems. This procedure relies on Expand's NCP table for processor status. This table is not
updated immediately with current processor status, so there is a window of time during which
a check of REMOTEPROCESSORSTATUS indicates an erroneous processor UP condition. A
subsequent call to PROCESS_CREATE_ goes directly to the downed processor and fails. You
must take care to avoid this possible window problem when writing code to handle retries
and other related problems.
REMOTEPROCESSORSTATUS Procedure 1237