SNAX/HLS Application Programming Manual
SCOBOLX Applications
SNAX/HLS Programming Standards
104707 Tandem Computers Incorporated 1–17
Note that Desired^Answer, (the recipient of the string) should be declared with the
capability of holding a string of the size defined by the string width literal.
Note Since LITERAL DT^WIDTH is not in the DT^NAMS section, you must source section
DATA^TYPE^DEFINITIONS for this example to work.
Application-to-SNAX/HLS
Interfacing
An application program written in a language such as TAL, with direct access to
procedures, communicates with SNAX/HLS through the OPEN, CLOSE,
WRITEREAD, AWAITIO (if you are using nowait IO), and CONTROL procedures. In
addition, limited use of the SETMODE and RESETSYNC procedures is allowed. The
CONTROLBUF and CANCEL procedures should not be used.
CLOSE Procedure
The CLOSE procedure removes a connection to SNAX/HLS. If this is the last
connection serving a particular session, any resources held on behalf of that session are
deleted. The sessions are automatically unbound.
CONTROL Procedure
Use CONTROL to interrupt any WRITEREAD calls issued on the file that have not yet
completed. The only control codes recognized by SNAX/HLS are 26,0 and 26,1. All
others are rejected with a file-system reply code of 2.
SNAX/HLS responds to a CONTROL 26,1 with a reply code of 70. There is no impact
on outstanding I/O operations. Many applications use this particular call to ascertain
whether the responding subsystem acknowledges the CONTROL 26,0 in the manner
described below. Such a call is formulated:
CALL CONTROL( file^number, 26, 1);
SNAX/HLS responds to a CONTROL 26,0 with a file-system reply code of 0. All
outstanding WRITEREAD requests on this file are located and completed with a file-
system reply code of either 187 or 189.
A reply code of 187 indicates that the WRITEREAD was completed without any loss of
data and without any outstanding work being left behind. This method is used to
complete RECEIVE-DATA verbs, RECEIVE-CONTROL-WAIT verbs, and
SEND-AND-RECEIVE-DATA verbs that have been internally transformed into
RECEIVE-DATA verbs. Note that the verb is completed without having affected the
session in any way. Even though there might be no pending RECEIVE-DATA verb on
this session, SNAX/HLS queues any data that might arrive and retains it until you
issue a subsequent RECEIVE-DATA or similar verb.
A reply code of 189 indicates that the work being performed on behalf of the verb
carried in the WRITEREAD is still incomplete. The WRITEREAD request itself is
completed with a value of 189, but the work still is going on. The results of that work,
when complete, are queued to the session and can be retrieved on a subsequent
RECEIVE-DATA or similar verb reply. This deferred notification is similar to the
queued reply described under the heading “Queued Completion Mode,” except the