EasyManuals Logo
Home>HP>Software>TACL

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 #96 background image
Requesting Nowaited Writes
Accessing Files
4–8 107365 Tandem Computers Incorporated
Requesting Nowaited
Writes
To open a file for nowaited write operations, issue a #REQUESTER call and omit the
WAIT option. The following statement opens FILE1 and initializes error_var and
write_var. If FILE1 does not exist, TACL creates an Edit file:
#SET rslt [#REQUESTER WRITE file1 error_var write_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 write operation is shared. For example:
#REQUESTER /EXCLUSION PROTECTED/ WRITE file2 error_var &
write_var
To initiate the write operation, append data to the write variable:
#APPEND write_var This is a test
When TACL detects data in write_var, it writes the record to FILE1.
You can add a record to a structured file but you cannot replace a record. If you
attempt to write a record that already exists, TACL returns an error.
Each time you append a line to write_var, the TACL process writes a record to
FILE1. 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 the write_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 writing to the file, call the #WAIT function to make sure that
the last write has finished. Next, issue a CLOSE request and supply one of the variable
levels associated with the file; for example:
#REQUESTER CLOSE write_var
This operation closes FILE1 (associated with write_var) and terminates the
#REQUESTER function.

Table of Contents

Questions and Answers:

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
BrandHP
ModelTACL
CategorySoftware
LanguageEnglish

Related product manuals