Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual522629-013
13-31
READUPDATE[X] Procedures
pointer action for unstructured files is unaffected.
of count-read for unstructured files
After a successful call to READUPDATE[X] to an unstructured file, the value
returned in
count-read is determined by:
count-read := $MIN(read-count,EOF - next-record
- next-record pointer)
number of bytes read
If the unstructured file is created with the odd unstructured attribute (also
known as ODDUNSTR) set, the number of bytes read is exactly the number
specified with
read-count. If the odd unstructured attribute is not set when
the file is created, the value of
read-count is rounded up to an even value
before the READUPDATE[X] is executed.
You set the odd unstructured attribute with the FILE_CREATE_ ,
FILE_CREATELIST_ , or CREATE procedure, or with the File Utility Program
(FUP) SET and CREATE commands.
Interprocess Communication Considerations
Replying to messages
Each message read in a call to READUPDATE[X], including system messages,
must be replied to in a corresponding call to the REPLY[X] procedure.
Queuing several messages before replying
Several interprocess messages can be read and queued by the application
process before a reply must be made. The maximum number of messages that
the application process expects to read before a corresponding reply is made must
be specified in the
receive-depth parameter to the FILE_OPEN_ or OPEN
procedure.
If $RECEIVE is opened with receive-depth = 0, only READ[X]s can be
performed, and READUPDATE[X] and REPLY[X] fail with error 2 (“operation not
allowed on this type of file”).
Message tags when replying to queued messages
If more than one message is to be queued by the application process (that is,
receive-depth > 1), a message tag that is associated with each incoming
message must be obtained in a call to the FILE_GETRECEIVEINFO_ (or
LASTRECEIVE or RECEIVEINFO) procedure following each call to
READUPDATE[X]. To direct a reply back to the originator of the message, the
message tag associated with the incoming message is passed to the system in a
parameter to the REPLY[X] procedure. If messages are not to be queued, it is not
necessary to call FILE_GETRECEIVEINFO.