EasyManua.ls Logo

HP TACL User Manual

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
Page #80 background imageLoading...
Page #80 background image
Writing an Exception Handler
Developing TACL Routines
3–24 107365 Tandem Computers Incorporated
Figure 3-14. Returning Information From a Release Handler (Page 3 of 3)
#SETMANY filespurged filesnotpurged exclude, 0 0 0
[#CASE [#ARGUMENT /VALUE filetemplate/ TEMPLATE &
TOKEN /TOKEN !/]
|1|
|2|
#SET exclude -1
SINK [#ARGUMENT /VALUE filetemplate/ TEMPLATE]
]
[#LOOP |WHILE| 1 |DO|
handletemplate
[#CASE [#ARGUMENT /VALUE filetemplate/ COMMA TEMPLATE
END]
|1|
#IF [#ARGUMENT /VALUE filetemplate/ TEMPLATE]
|2|
|3|
#OUTPUT == blank line
#OUTPUT Number of files purged =[filespurged]
#OUTPUT Number of files not purged=[filesnotpurged]
#UNFRAME
#RETURN
]
] == end of #LOOP
Creating a Keep Exception
Handler
A keep exception handler processes exceptions but does not return to the calling
process. If, for example, you want to provide a restrictive command shell with five
commands, a keep handler allows you to process the five commands and any errors or
break conditions without exiting the routine. The user could not, then, gain access to a
standard TACL prompt.
The _CALL path is the entry point for the routine and, because control is to remain in
the routine, it is not likely to be executed repeatedly. Therefore, the _CALL path
contains the #FRAME and variable declarations that typically begin a routine.
Use the routine in Figure 3-15, restricted_cmd_processor, as a sample keep
exception handler. If the BREAK key is pressed while the processing loop is running,
TACL raises the _BREAK exception and reinvokes the routine; the #CASE function
takes the _BREAK path and then reenters the loop.
If the user enters anything other than ADD or SUB, the #CASE statement in the loop
raises _ERROR, and TACL reinvokes the routine; in this situation, the exception-
processing #CASE takes the _ERROR path before resuming the loop.

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
NameHP TACL
PurposeTask automation, system management, and application control
CategorySoftware
PlatformHP NonStop
TypeScripting language
DeveloperHewlett-Packard

Summary

Section 1 An Overview of TACL

Running the Examples in This Manual

Instructions for executing manual examples, including setting required variables.

About This Manual

Section 2 Developing TACL Programs

Processing Character Data

Covers tasks like constructing text strings, analyzing output, and manipulating characters.

Debugging TACL Programs

Introduces the TACL debugger for step-by-step execution and variable examination.

Section 3 Developing TACL Routines

Processing Arguments

Details how routines handle arguments using #ARGUMENT, including options and alternatives.

Writing an Exception Handler

Explains handling events like BREAK keys or TACL errors using exception handlers.

4 Accessing Files

#REQUESTER Operation

Describes the #REQUESTER function for opening files and initiating I/O operations.

Requesting Waited Reads

Explains opening files for waited read operations using #REQUESTER.

5 Initiating and Communicating With Processes

Initiating a Process: RUN and #NEWPROCESS

Covers starting processes using RUN and #NEWPROCESS, including startup options.

6 Running TACL as a Server

Running a TACL Process as a Server

Explains making a TACL process a server by establishing its IN file as $RECEIVE.

Running TACL Code as a Server

Details providing TACL code for a TACL-server process using #INPUTV and #REPLYV.

Using TACL as a Pathway Server

Describes creating a Pathway environment with TCP and TACL servers to process requests.

7 Using Programmatic Interfaces

8 Example of a System Management Program

Related product manuals