Guardian Programmer's Guide

Table Of Contents
Communicating With Processes
Guardian Programmer’s Guide 421922-014
6 - 46
Programming the Requester
! Now that we have the user's changes, send a request to
! the server to have the file updated. The server uses
! the REQUEST.OLD information to determine if the
! record has been updated while the user was responding:
REQUEST.REQUEST^FUNCTION := UPDATE^ONE;
CALL WRITEREADX(SERVER^NUM,REQUEST,$LEN(REQUEST),
$LEN(PART^RECORD));
IF <> THEN
BEGIN
CALL FILE_GETINFO_(SERVER^NUM,ERROR);
IF ERROR = 300 THEN
BEGIN
PRINT^STR("The record was changed by someone " &
"else while you were working on it.");
PRINT^STR("Your change was not made.");
RETURN;
END
ELSE CALL FILE^ERRORS(SERVER^NUM);
END;
PRINT^STR("Your changes have been made ");
END;