SNAX/HLS Configuration and Control Manual

Step 5. Planning for Programming Standards
Planning the SNAX/HLS Environment
104705 Tandem Computers Incorporated 2–25
!----------------------------------------------!
! The Procedure "ANALYZE^READ^RESPONSE" is !
! called when a piece of data is received. !
!----------------------------------------------!
PROCEDURE ANALYZE^READ^RESPONSE;
BEGIN
!---------------------------------------------
! Test the completion code to eliminate errors.
!---------------------------------------------
IF RECEIVE^DATA^REPLY.RETURN^CODE <> 0 THEN
BEGIN
.
. ! Some error has occurred. It must be
. ! diagnosed and handled.
.
. CALL PROCESS^RECEIVE^ERROR;
. RETURN;
END;
!--------------------------------------------
! Verify that the response received is actually
! a RECEIVE^DATA response. Remember that
! that is only one of the possible responses to
! the RECEIVE^DATA request.
!--------------------------------------------
IF VERB^CODE <> VERB^RECEIVE^DATA THEN
BEGIN
.
. ! The data returned by SNAX/HLS was other than
. ! RECEIVE^DATA. The possibilities include
. ! SEND^DATA, or a queued completion. The
. ! treatment of those responses is not
. ! covered here.
.
. CALL PROCESS^OTHER^RESPONSE;
. RETURN;
END;
! At this point, no errors have occurred.
! We will set "KIND" to represent the kind of
! data just read in, and then invoke a procedure
! dependent upon the specific type of data.
KIND := RECEIVE^DATA^REPLY.DATA^TYPE^RECEIVED;