Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (L)
Guardian Procedure Calls Reference Manual—522629-013
8-8
LASTRECEIVE Procedure
(Superseded by FILE_GETRECEIVEINFO_
Condition Code Settings
< (CCL) indicates that $RECEIVE is not open.
= (CCE) indicates that LASTRECEIVE was successful.
> (CCG) does not return from LASTRECEIVE.
Considerations
•
The process ID that is returned by LASTRECEIVE
The process ID returned by LASTRECEIVE following receipt of a preceding open,
close, CONTROL, SETMODE, SETPARAM, RESETSYNC, or CONTROLBUF
system message, or a data message, identifies the process associated with the
operation. The high-order three words of the process ID will be 0 following the
receipt of system messages other than the ones just named.
•
Synthetic process ID
If HIGHREQUESTERS is enabled for the calling process (either because the
?HIGHREQUESTERS flag is set in the program file or because the caller used
FILE_OPEN_ to open $RECEIVE) and the last message was sent by a high-PIN
process, then the returned process ID is as described above except that the value
of the PIN is 255. This form of the process ID is referred to as a
synthetic
process ID. It is not a full identification of the process but it is normally sufficient
for distinguishing, for example, one requester from another requester. Refer to the
Guardian Programmer’s Guide for further details.
•
Remote opener with a long process file name
If the calling process used FILE_OPEN_ to open $RECEIVE and did not request to
receive C-series format messages, and if the last message read from $RECEIVE
is from a remote process that has a process name consisting of more that five
characters, then the value of
process-id returned by LASTRECEIVE is
undefined.
Example
CALL LASTRECEIVE ( PROG1^ID );
The LASTRECEIVE procedure returns the identification of the process that sent the
last message.