Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting TAL Applications
096047 Tandem Computers Incorporated 3–49
Reading System Messages From $RECEIVE
Your existing server might read system messages from $RECEIVE using the READ[X]
or READUPDATE[X] procedure using code similar to the following:
STRING .message^buffer[0:199]; ! Message buffer (200 bytes).
...
read^count := 200;
CALL READX (receive^file^number,
message^buffer,
read^count,
bytes^read);
The lengths shown for each system message are subject to change. Use a 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 ZSYSTAL file, use the ZSYS^VAL^SMSG^LEN
LITERAL for the system-message length in bytes or the ZSYS^VAL^SMSG^WLEN
LITERAL for the length in words:
STRING .message^buffer[0:ZSYS^VAL^SMSG^LEN - 1]; ! Message
! buffer (250 bytes)
...
read^count := ZSYS^VAL^SMSG^LEN;
CALL 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:
CALL 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);