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 #78 background imageLoading...
Page #78 background image
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

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