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 #82 background imageLoading...
Page #82 background image
Writing an Exception Handler
Developing TACL Routines
3–26 107365 Tandem Computers Incorporated
When you invoke restricted_cmd_processor, the output looks like this:
16> restricted_cmd_processor
Enter cmd: add
ADD
Enter cmd: clr
Invalid command
TACL error occurred.
Enter cmd: <BREAK>
BREAK key pressed.
Enter cmd: exit
17>
By using the definitions in Figure 3-16, a user can start and stop an application. (In the
example, there is no code to start an application; the code performs a delay sequence
to simulate application activity.)
The definitions in Figure 3-16 use the following global variables:
Condition is an error flag; if 0, there is no error; if 1, there is an error, and
recovery might be necessary.
Recovery indicates the need to run a routine to clear local variables. If OFF,
recovery is not necessary; if ON, recovery is necessary.
The shell supports the following commands:
Coldstart —Pops old variables if necessary, pushes new variables, sets the
condition and recovery variables, and then starts the application. If the user
presses BREAK during this time, the exception handler sets the condition and
recovery flags.
When finished, coldstart resets the condition and recovery flags.
Warmstart—Attempts to purge a file with an invalid file name; this attempt
forces a TACL error to show exception handler operation.
Shutdown —Performs a cleanup operation and sets condition to 0.
Exit—Tests the condition variable and does not allow the user to exit until the
error is resolved. If condition is 0, exit raises the user-defined EXIT exception
and exits the shell.
Variables a, b, c, d, e, f, g, and h are created but are not used in this example; they are
deleted during the cleanup phase before exiting.
If an error occurs during coldstart or warmstart, the user cannot exit the shell
until a successful coldstart or shutdown occurs.
For this example, the keep handler returns if you enter an exit command. Usually, a
keep handler would not provide an exit mechanism.

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