
Using TACL as a Pathway Server
Running TACL as a Server
107365 Tandem Computers Incorporated
6–7
Use the code in Figure 6-2 as a sample Pathway server. This file is known as TACLIN
in the Pathway configuration file; if you use a different file name, modify the
configuration file.
Figure 6-2. Running a TACL Program as a Server (Page 1 of 2)
?TACL ROUTINE
#FRAME
[#DEF process routine |BODY|
#FRAME
#PUSH param status
[#CASE [#ARGUMENT KEYWORD /WORDLIST create/
KEYWORD /WORDLIST print /
KEYWORD /WORDLIST purge /
OTHERWISE
]
| 1 | {CREATE file}
[#CASE [#ARGUMENT /VALUE param/ FILENAME TEMPLATE END
TEXT]
| 1 | #RESULT File [param] already exists !
| 2 | CREATE [param]
#RESULT File [param] created
| 3 | #RESULT No file name supplied!
| 4 | #RESULT Invalid file name: [param]
]
| 2 | {PRINT file}
[#CASE [#ARGUMENT /VALUE param/ FILENAME END TEXT]
| 1 | fup /NOWAIT,OUT $null/copy [param],$s.#prt
#RESULT Printing of file [param] started
| 2 | #RESULT No file name supplied!
| 3 | #RESULT Invalid file name or file does not exist:&
[param]
]
| 3 | {PURGE file}
[#CASE [#ARGUMENT /VALUE param/ FILENAME END TEXT]
| 1 | #SET status [#PURGE [param]]
[#IF status |THEN|
#RESULT Error [status] during purge of file &
[param]
|ELSE|
#RESULT File [param] purged
]
| 2 | #RESULT No file name supplied!
| 3 | #RESULT Invalid file name or file does not exist:&
[param]
]