Nondestructive Reads [ Interprocess Communication:Programmer's Guide ] MPE/iX 5.0 Documentation
Interprocess Communication:Programmer's Guide
Nondestructive Reads
Another potential problem occurs when a server is not able to honor a
request in a message file record immediately because of a lack of
resources. The requests must be handled in order, and so the server
tries to free the resources it requires. Eventually the server comes
back and tries again to process the request.
In this case it is useful to have a "nondestructive" read, that is, to
look at the request record in the message file without deleting it. A
test is made to see if the request can be satisfied. If it can, a
regular destructive read is done and the request is processed. If the
request cannot be satisfied, it stays on the top of the queue, where it
can be read and tested at a later time.
This feature is provided by FCONTROL with a controlcode of 47. It is
valid for readers only, and it affects only the following FREAD. Note
that repeated use of nondestructive FREAD always reads the same record.
You can copy the message file to another file, if, for example, you want
to save it after it has been read. You can do this by accessing it with
the Copy Mode option (HPFOPEN Item #17, or FOPEN aoption (3:1)). You
should note, however, that accessing a file in Copy Mode means that it
does not have any of the special features of message files. For a
description of the Copy Mode option, refer to Appendix A of this manual,
or the MPE XL Intrinsics Reference Manual (32650-90028).
MPE/iX 5.0 Documentation