6100 MPS-B Programming Manual

6100 MPS-B PROGRAMMING EXAMPLE
! NOTE: Because the NONSTOP configuration option has been
! selected, only a very simple error recovery needs to be
! implemented. When running with the NONSTOP option, MPS-B
! will not process requests with a duplicate request ID.
DO ! Send the request to MPS-B.
BEGIN
CALL WRITEREAD (linefnum, ireq^buff,line^write^count,
line^read^count,line^count^read);
IF <> THEN
BEGIN
CALL FILEINFO (linefnum,file^error);
req^buff ’:=’ save^req^buff for $LEN(save^req^buff);
retry^count := retry^count + 1;
END;
! NOTE: If the WRITEREAD is successful, let’s positively be sure
! that no data was lost between the CLIP and the WRITEREAD
! buffer.
IF NOT file^error
THEN IF line^count^read <> req^header + textin
THEN file^error := cp^6100^error;
END
UNTIL NOT file^error OR retry^count = max^retries;
RETURN (file^error);
END; ! of send^request.
B-9