Guardian Application Conversion Guide

Using Sequential I/O (SIO) Procedures
Converting Other Parts of an Application
8–20 096047 Tandem Computers Incorporated
Specifying an Opener
for $RECEIVE Using the
SET^FILE Procedure
Your existing program might specify an allowable opener for $RECEIVE (and
therefore a process that is allowed to send you messages) using the SET^FILE
procedure and the SET^OPENERSPID parameter:
error := SET^FILE (receive^file,
SET^OPENERSPID,
@mom^pid);
Convert your program to use the SET^OPENERSPHANDLE parameter in the
SET^FILE call. The system then uses a process handle rather than a process ID to
identify the allowable opener. In this example, SET^FILE sets the opener's process-
handle address for the $RECEIVE FCB to
mom^phandle
:
error := SET^FILE (receive^file,
SET^OPENERSPHANDLE,
@mom^phandle);
Specifying System
Messages Using the
SET^FILE Procedure
Your existing program might specify the system messages it wants to read from
$RECEIVE using the SET^FILE procedure and the SET^SYSTEMMESSAGES or
SET^SYSTEMMESSAGESMANY parameter.
Setting a bit in the one-word SET^SYSTEMMESSAGES
sys-msg-mask
parameter or
the four-word SET^SYSTEMMESSAGESMANY
sys-msg-mask-words
parameter
specifies a system message that a program can read:
error := SET^FILE (receive^file,
SET^SYSTEMMESSAGES,
receive^msg^mask,
old^msg^mask);
The SET^SYSTEMMESSAGES
sys-msg-mask
parameter has the new bit values
shown in Table 8-1. The SET^SYSTEMMESSAGESMANY
sys-msg-mask-words
parameter has the new bit values shown in Table 8-2. The values for the remaining
bits for each parameter are listed in the Guardian Procedure Calls Reference Manual.
Table 8-1. SET^SYSTEMMESSAGES Parameter
Bit D-Series System Message C-Series System Message
sys-msg-mask [0]:
.<5> -101 (Process deletion) -5 (Process deletion: Stop)
.<6> Unused -6 (Process deletion: Abend)
.<8> Unused; see sys-msg-mask-words [3].<4:7> -8 (MONITORNET)