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 #86 background imageLoading...
Page #86 background image
Writing an Exception Handler
Developing TACL Routines
3–30 107365 Tandem Computers Incorporated
Figure 3-16. Sample Command Shell (Page 4 of 4)
?SECTION exit MACRO == EXIT the exception handler
[#IF condition = 1 |THEN|
#OUTPUT Can not EXIT without resolving the error.
#OUTPUT Must WARMSTART, COLDSTART, or SHUTDOWN.
#OUTPUT
|ELSE|
#OUTPUT Exiting restrictive command shell.
#RAISE EXIT
]
?SECTION cleanup MACRO == delete variables from prev. errors
#SET #BREAKMODE DISABLE
#OUTPUT Performing cleanup procedure
#OUTPUT The Break Key is disabled until cleanup is complete.
[#CASE [name][step]
| WARMSTART1 |
#POP a b
| WARMSTART2 |
#POP a b c d
| COLDSTART1 |
#POP e f
| SHUTDOWN1 |
#POP g h
]
#OUTPUT
#DELAY 200
#SETMANY condition recovery , 0 OFF
#SET #BREAKMODE ENABLE
#OUTPUT Cleanup procedure complete.
Combining Keep and
Release Handlers
The routines in Figure 3-17 show one way to combine a keep handler
(restricted_caller) and a release handler (protected_code).
Restricted_caller starts first; therefore, if an exception occurs, control returns to
the processing loop after the exception is processed.
When the user enters a valid command, restricted_caller calls
protected_code to execute the command; that routine, in turn, calls either do_add
or do_sub. If the user presses the BREAK key or an unknown exception is raised
during execution of either of the latter routines, TACL pops the routine and reinvokes
protected_code. The #CASE function takes the OTHERWISE path, which
performs an orderly deallocation of resources and then raises the same exception.
TACL then pops that routine (the #FILTER function has not yet been executed in the
reinvocation) and returns to restricted_caller. The #CASE function in that
routine takes the appropriate path to deal with the exception and restarts the
processing 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