Guardian Application Conversion Guide
Being Opened by and Communicating With a High-PIN Requester
Converting C Applications
5–28 096047 Tandem Computers Incorporated
Reading System Messages From $RECEIVE
Your server might read system messages from $RECEIVE using the READ[X] or
READUPDATE[X] procedure:
char message_buffer[200]; /* Message buffer (200 bytes) */
...
read_count = 200;
c_code = 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 ZSYSC 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:
char message_buffer[ZSYS_VAL_SMSG_LEN];
...
read_count = ZSYS_VAL_SMSG_LEN;
c_code = 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:
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);