Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting Pascal Applications
6–26 096047 Tandem Computers Incorporated
Reading System Messages From $RECEIVE
Your server might read system messages from $RECEIVE using the Guardian
READ[X] or READUPDATE[X] procedure:
{ Message buffer (200 bytes) }
VAR message_buffer: ARRAY [1..200] OF CHAR;
...
read_count := 200;
status := READX (receive_file_number,
message_buffer,
read_count,
bytes_read);
The lengths shown for each system message are subject to change. Use a Guardian
READ[X] or READUPDATE[X] message buffer at least 250 bytes in length. Also, use a
read_count
parameter value of 250 bytes.
If you use the declarations in the ZSYSPAS file, use the ZSYS_VAL_SMSG_LEN
constant for the system-message length in bytes or the ZSYS_VAL_SMSG_WLEN
constant for the length in words:
VAR message_buffer: ARRAY [1..ZSYS_VAL_SMSG_LEN] OF CHAR;
...
read_count := ZSYS_VAL_SMSG_LEN;
status := READX (receive_file_number,
message_buffer,
read_count,
bytes_read);
Getting Information About System Messages
Your server might call the RECEIVEINFO or LASTRECEIVE procedure to obtain
information about the last message read from $RECEIVE:
status := RECEIVEINFO (process_id,
message_tag,
sync_id,
file_number,
read_count,
io_type);
Convert the RECEIVEINFO or LASTRECEIVE call into a call to the
FILE_GETRECEIVEINFO_ procedure:
{ Return information about the last message }
error := FILE_GETRECEIVEINFO_(message_info);