Guardian Programmer's Guide

Table Of Contents
Communicating With Processes
Guardian Programmer’s Guide 421922-014
6 - 19
Getting Information About Messages Read
From $RECEIVE
Getting Information About Messages Read From $RECEIVE
In addition to the message tag, the FILE_GETRECEIVEINFO_ procedure returns
additional information about the last message read from the $RECEIVE file. The
FILE_GETRECEIVEINFO_ procedure returns information as follows:
STRUCT .INFORMATION(ZSYS^DDL^RECEIVEINFORMATION^DEF);
.
.
ERROR := FILE_GETRECEIVEINFO_(INFORMATION);
IF ERROR <> 0 THEN ...
The returned information includes the following:
The I/O operation issued by the sender
The maximum length of the reply message
The tag value that identifies the message
The file number used by the sender for communicating with this process
The sync ID for fault-tolerant processing
The process handle that identifies the sending process
The open label
This information is typically used by the server process to assign priorities for message
handling and to establish message tracking.
This subsection discusses some of the more commonly used information. For further
information, you should refer to Section 16, Creating and Managing Processes, for
information on process handles or to the Guardian Procedure Calls Reference Manual
for complete details about all information returned by the FILE_GETRECEIVEINFO_
procedure.
Getting the I/O Operation
The I/O operation specified by the requester is returned in word 0 of the value returned
by the FILE_GETRECEIVEINFO_ procedure. It has one of the following values:
0
Indicates that the last message received was a system message. Refer to , later
in this section, for a discussion of system messages.
1
Indicates that the last message received resulted from a WRITE[X] procedure
call by the requester process.
2
Indicates that the last message received resulted from a READ[X] procedure call
by the requester process.
3
Indicates that the requester process issued a WRITEREAD[X] procedure call.