HP TACL Programming Manual page 26

Tandem advanced command language
Table of Contents

Advertisement

Developing TACL Programs
Defining Program Structure
Note
2–6
Figure 2-3. Deleting Files in a Subvolume (Page 2 of 2)
[#IF [#MATCH Y* [#SHIFTSTRING/UP/[reply]]]
|THEN|
#SET resp [#PURGE [filenm]]
[#CASE [resp]
|0|
#OUTPUT [filenm] purged
|OTHERWISE|
#OUTPUT [filenm] could not be purged
#OUTPUT Error [resp]
] {end #CASE}
] {end #IF}
|OTHERWISE|
== Not an edit file; determine whether to purge it
#OUTPUT Not an Edit file; nothing to show you.
#SET prompt Do you want to purge/empty [filenm] &
(y/n/e)?
#INPUTV reply prompt
[#IF [#MATCH Y* [#SHIFTSTRING/UP/[reply]]] |THEN|
#SET resp [#PURGE [filenm]]
[#CASE [resp]
|0|
#OUTPUT [filenm] purged
|OTHERWISE|
#OUTPUT [filenm] could not be purged
#OUTPUT Error [resp]
] == end #CASE
] == end #IF
[#IF [#MATCH E* [reply]] |THEN|
FUP PURGEDATA
]
] == end #CASE
== Get the next file
#SET filenm [#NEXTFILENAME [filenm] ]
[#SET volsubvol
[#FILEINFO/VOLUME/[filenm]].[#FILEINFO/SUBVOL/[filenm]]
] == end #SET
] == end #LOOP
#UNFRAME
The previous example starts FUP several times; a more efficient way is to start FUP once and send it a
series of commands. For information about starting a process and sending it commands, see Section 5,
"Initiating and Communicating with Processes."
107365 Tandem Computers Incorporated
== empty the file
[filenm]

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents