6100 MPS-B Programming Manual
6100 MPS-B PROGRAMMING EXAMPLE
?PAGE "PROCEDURE: REQUEST"
PROC request (function,modifier,t^out,t^in) VARIABLE;
INT function,
modifier,
t^out,
t^in;
BEGIN
rfunction := function; ! Initialize the request
rmodifier := modifier; ! header fields with passed
textout := t^out; ! parameters.
textin := t^in;
IF send^request <> 0 THEN ! Issue a WRITEREAD request.
CALL log^error ! IF the send failed after 3
(linefnum,file^error); ! retries, log the FILE
! SYSTEM error, then ABEND.
! Check response status.
IF status <> 0 THEN ! IF MPS-B returned an error,
CALL log^error; ! log the status error.
! (Appropriate error recovery
! will be done by the caller).
END; ! of request.
B-10