Using TACL as a Pathway Server
Running TACL as a Sever
6–8
107365 Tandem Computers Incorporated
Figure 6-2. Running a TACL Program as a Server (Page 2 of 2)
| 4 | {invalid request}
#RESULT Invalid request !
#UNFRAME
#RETURN
]
#UNFRAME
]
[#DEF reply ROUTINE |BODY| == Reply to Screen COBOL
#FRAME
#PUSH text
[#DEF answer80 STRUCT == 80-character text response
BEGIN
CHAR byte(0:79);
END;
]
#IF [#ARGUMENT /VALUE text/ TEXT]
#SET #REPLYPREFIX 0 == constant reply code
#SET answer80 [#CHARGET text 1 to 80]
[#IF [#INTERACTIVE] |THEN|
#OUTPUT [answer80] == Display the result
|ELSE| == or
#REPLYV answer80 == Reply
]
#UNFRAME
]
==main loop
#PUSH request prompt outcome end_flag
#SET end_flag 0
[#LOOP |DO|
== Read a record
#INPUTV / NOECHO / request prompt
[#IF [#INPUTEOF] |THEN|
#SET end_flag 0
|ELSE|
#SET outcome [process [request] ]
reply [outcome]
]
|UNTIL| end_flag
]
#UNFRAME