Figure 4-4 Reading From A Terminal And Performing A Nowaited Write - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Use the routine in Figure 4-4, nowaited_write, to perform nowaited writes to the
file specified in the first argument in the invocation. If the file already contains data,
this routine appends the new data to the end of the file. To invoke this routine, load
the file and type:
nowaited_write filename
Figure 4-4. Reading From a Terminal and Performing a Nowaited Write
?SECTION nowaited_write ROUTINE
#FRAME
#PUSH open_error write_error write_data write_prompt line
#PUSH write_file rslt
#SET #INPUTEOF 0
#SET rslt [#ARGUMENT /VALUE write_file/ FILENAME OTHERWISE]
[#CASE [rslt]
|1|
== Open the file:
#SET open_error [#REQUESTER WRITE [write_file]
[#IF [open_error] |THEN|
#OUTPUT *** Error opening [write_file]:
#RETURN
]
[#LOOP |DO|
[#CASE [#VARIABLEINFO/VARIABLE/
[#WAIT write_data write_error]]
|write_data |
#APPEND write_data [#INPUT b_:]
|write_error|
#OUTPUT Error [write_error] on write
]
|UNTIL| [#INPUTEOF]
]
|OTHERWISE|
#OUTPUT *** Error:
#RETURN
] == end #CASE
SINK [#REQUESTER/WAIT/CLOSE write_data]
#UNFRAME
107365 Tandem Computers Incorporated
write_error write_data]
Invalid file ***
Accessing Files
Requesting Nowaited Writes
[open_error]
4–9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents