SNAX/HLS Application Programming Manual
SCOBOLX Applications
SNAX/HLS Programming Standards
104707 Tandem Computers Incorporated 1–11
The WORKING-STORAGE section of the program should include the following
definitions:
COPY send-and-receive-data-request OF hlsdds.
02 send-length PIC 9(4) COMP.
02 send-text PIC X OCCURS 0 TO 397 TIMES
DEPENDING ON send-length
OF send-and-receive-data-request.
COPY receive-data-request OF hlsdds.
COPY send-data-reply OF hlsdds.
COPY receive-data-reply OF hlsdds.
02 recv-length PIC 9(4) COMP.
02 recv-text PIC X OCCURS 0 TO 435 TIMES
DEPENDING ON recv-length
OF receive-data-reply.
77 saved-termination-substatus PIC 9(4) COMP.
The PROCEDURE DIVISION of the program includes the following fragments of
code:
(Statements to prepare the fields of the
SEND-AND-RECEIVE-DATA-REQUEST, including the
SEND-LENGTH and SEND-TEXT fields)
MOVE verb-send-and-receive-data
TO verb-code OF send-and-receive-data-request.
SEND MESSAGE send-and-receive-data-request
REPLY CODE FIELD IS verb-code OF receive-data-reply
CODE verb-send-data YIELDS send-data-reply
CODE verb-receive-data YIELDS receive-data-reply
ESCAPE ON UNSOLICITED MESSAGE
TIMEOUT 20
ON ERROR GOTO something-happened.
normal-ending.
PERFORM ONE OF
reply-was-send-data
reply-was-receive-data
unsolicited-message-arrived
DEPENDING ON termination-status.
(operation is complete)
operation-timed-out.
(A timeout occurred but the send portion of the SEND-AND-
RECEIVE operation has completed)
...............