Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting Pascal Applications
096047 Tandem Computers Incorporated 6–25
Opening $RECEIVE
Your server might open $RECEIVE using the OPEN procedure with bit 1 of the
flags
parameter set to 1 (
flags
= 8#40000). This allows you to receive system messages
such as -30 (Process open) and -31 (Process close):
VAR receive_name: ARRAY[1..12] OF INTEGER;
CONST read_open_close_msgs = 8#40000;
...
receive_name := "$RECEIVE ";
status := Guardian_OPEN (receive_name,
receive_file_number,
read_open_close_msgs, { octal 40000}
receive_depth);
Convert your server to open $RECEIVE using the FILE_OPEN_ procedure:
1. Use a file-name string for the $RECEIVE file name instead of the internal file-name
format. Specify the length as a separate integer value.
2. Make sure that bit 15 of the FILE_OPEN_
options
parameter is zero (the default
value). If this bit is not zero, system messages such as -103 (Process open) and -104
(Process close) are not sent to $RECEIVE.
3. Make sure that bit 14 of the FILE_OPEN_
options
parameter is zero (the default
value) so that the system sends D-series system messages to $RECEIVE. If this bit
is not zero, the system sends C-series system messages to $RECEIVE.
4. Set any other FILE_OPEN_ input parameters as required and call the procedure:
CONST receive_name_length = 8;
VAR receive_name: ARRAY [1..receive_name_length] OF CHAR;
...
{ Open $RECEIVE to read D-series system messages }
receive_name := "$RECEIVE";
error := FILE_OPEN_(receive_name:receive_name_length,
receive_file_number,
{ access_mode } ,
{ exclusion_mode } ,
nowait_operations,
receive_depth);
If you open $RECEIVE using the FILE_OPEN_ procedure, the system assumes that
you support high-PIN requesters (provided bit 14 of the
options
parameter is zero).
You do not need to explicitly set the HIGHREQUESTERS object-file attribute in your
server’s object file.
When you close $RECEIVE, use either the Guardian CLOSE or FILE_CLOSE_
procedure.