Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 53
Selecting or Masking System Messages
When keeping track of openers, SIO maintains a list of openers and limits the number
of openers to one process pair. If more processes attempt to open your process, the
SIO procedures reject the extra open attempts. To control attempts to open a process,
SIO monitors the following system messages:
If you need to allow more than one opener, your process must handle the above
messages.
To perform BREAK handling, SIO monitors system message -105 (or -20), the Break-
on-device message. This message signals the fact that the BREAK key was pressed.
SIO saves this information for processing by the CHECK^BREAK procedure. See
Handling BREAK Ownership, later in this section, for details.
The remainder of this subsection shows how to override automatic system-message
handling and process messages within your program. Specifically it shows how to
perform the following operations:
Mask system messages that you want your program to accept
Read system messages from the $RECEIVE file
Selecting or Masking System Messages
Use the SET^SYSTEMMESSAGESMANY operation of the SET^FILE procedure to
select which system messages you want your process to receive.
You specify a four-word mask with the SET^SYSTEMMESSAGESMANY operation.
E
ach system message that could be sent to the process has a bit position in the mask.
-2 (Processor down) If the list of openers includes a process from the
failing CPU, then SIO removes that process from the
list.
-100 (Remote processor
down)
If the list of openers includes a process from the
remote CPU that failed, then SIO removes that
process from the list.
-103 (Process open) SIO checks a list of openers to see whether another
process already has the current process open. If no
other process has the current process open, SIO
puts the process handle of the opener into the list of
openers and the open continues. If the current
process is already open, SIO rejects the open
request with an error code of 12 (file in use).
-104 (Process close) SIO removes the closing process from the list of
openers.
-110 (Loss of communication
with a network node)
If the list of openers includes a process from a CPU
on the failing network node, then SIO removes that
process from the list.