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 #92 background imageLoading...
Page #92 background image
Requesting Nowaited Reads
Accessing Files
4–4 107365 Tandem Computers Incorporated
Requesting Nowaited
Reads
To open a file for nowaited read operations, issue a #REQUESTER call and omit the
WAIT option; for example, the following statement opens FILE1 and initializes
error_var, read_var, and prompt_var:
#SET rslt [#REQUESTER READ file1 error_var read_var
prompt_var]
Note It is very important to check the results of the open operation; otherwise, you will not know if the open
request received an error.
To specify shared, protected, or exclusive access to the file, use the EXCLUSION
option; the default for a read operation is shared. For example:
#REQUESTER /EXCLUSION PROTECTED/ READ file2 error_var &
read_var prompt_var
To initiate a read operation, append data to the prompt variable:
#APPEND prompt_var *start read*
To read a disk file, TACL discards the data in prompt_var, reads a record from
FILE1, and places it into read_var. You can use #EXTRACT(V) to retrieve data from
read_var; as you #EXTRACT records, TACL deletes them from read_var.
Each time you append a line to prompt_var, the TACL process reads a record from
disk file FILE1 and appends it to read_var. TACL then performs a READ operation.
TACL continues executing code; when you are ready to wait for completion of the
read operation, use the #WAIT built-in function to wait until read_var contains
data. To avoid writing over data that has not yet been transmitted, use #WAIT to
make sure the previous operation has finished.
When you are finished reading from the file, issue a CLOSE request and supply one of
the variables associated with the file; for example:
#REQUESTER CLOSE error_var
This operation closes FILE1 (associated with error_var) and terminates the
#REQUESTER function.
Use the routine in Figure 4-2, nowaited_read, to perform nowaited reads from the
file specified in the first argument in the invocation and display the records on the
terminal. To invoke this routine, load the file and type:
nowaited_read
filename

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