Guardian Programmer's Guide

Table Of Contents
Writing a Server Program
Guardian Programmer’s Guide 421922-014
22 - 56
The Order-Query Server ($SER3)
! Read the record from the orders file:
CALL READUPDATEX(ORD^FNUM,SBUFFER,BUFSIZE,
COUNT^READ);
! If unable to position to the requested key, return
! the error number. This error occurs when the key is
! not in the orders file.
IF <> THEN
BEGIN
CALL FILE_GETINFO_(ORD^FNUM,REPLY^ERROR);
REPLY^LEN := 0;
RETURN;
END;
! Clear the REPLY^ERROR variable and set the reply
! string length to the length of the orders
! record if the read is successful:
REPLY^LEN := $LEN(ORDER^REC);
REPLY^ERROR := 0;
RETURN;
END;
! Check next entry in the opener table:
I := I + 1;
END;
! Requester not in opener table:
REPLY^LEN := 0;
REPLY^ERROR := 60;
END;