EasyManua.ls Logo

HP TACL - Figure 3-14. Returning Information from a Release Handler

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Writing an Exception Handler
Developing TACL Routines
3–22 107365 Tandem Computers Incorporated
When you invoke command_processor, the output looks like this:
16> command_processor
Enter cmd: add
ADD
Enter cmd: clr
Invalid command
TACL error occurred.
17> command_processor
Enter cmd: <BREAK>
BREAK key pressed.
18>
Use the routine in Figure 3-14, purgefiles, to purge files based on file name
templates. Purgefiles illustrates the use of #FILTER, #FILENAMES, and the
TEMPLATES alternative for the #ARGUMENT built-in function. To use this routine,
load the associated file and enter:
purgefiles [ ! ]
file-template
[ ,
file-template
] ...
The ! specifies purge without confirmation; without it, the routine prompts for each
file. If the routine encounters a _BREAK exception, it displays a message with the
number of files purged and the number not purged, and then exits.
Figure 3-14. Returning Information From a Release Handler (Page 1 of 3)
?SECTION purgefiles ROUTINE
[#CASE [#EXCEPTION]
|_CALL|
|_BREAK _ERROR|
#PUSH errtext
#ERRORTEXT /CAPTURE errtext/
#OUTPUT Break or error terminated function.
#OUTPUT
[#IF NOT [#EMPTYV /BLANK/ errtext] |THEN|
#OUTPUTV errtext
#OUTPUT
]
#OUTPUT Number of files purged = [filespurged]
#OUTPUT Number of files not purged = [filesnotpurged]
#UNFRAME
#RETURN
]
#FRAME
== Filter _BREAK and TACL errors
#FILTER _BREAK _ERROR
[#PUSH filetemplate exclude prevname purgeerr opt firsttime
filespurged filesnotpurged
]

Table of Contents

Related product manuals