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 #99 background imageLoading...
Page #99 background image
Copying Records Between Files
Accessing Files
107365 Tandem Computers Incorporated 4–11
Figure 4-5. Copying Records From One File to Another File (Page 2 of 2)
[#IF open_err = 0 |THEN|
#OUTPUT [dest] opened successfully
|ELSE|
#OUTPUT [dest] not open; error [write_err]
SINK [#REQUESTER CLOSE read_var] == close source
#RETURN
]
== Initiate read and write operations.
#SET read_err 0 == initialize read_err
[#LOOP |DO|
== Start the read.
#APPEND prompt_var READIT
== Wait for read_var or read_err to change.
#SET ready [#WAIT read_var read_err]
== If read_var changed, the read was successful.
[#IF [#MATCH read_var.* [Ready]] |THEN|
== Wait for the last write to complete
SINK [#WAIT write_var]
== Move the record into write_var to initiate the
== write operation.
#EXTRACTV read_var write_var
]
|UNTIL| ([read_err])
] == end of #loop
== Wait for the last write operation to finish.
SINK [#WAIT write_var]
== Close both files and terminate the #REQUESTER
== functions.
SINK [#REQUESTER CLOSE read_var]
SINK [#REQUESTER CLOSE write_var]
|2|
#OUTPUT *** Error: Invalid destination filename ***
]
|2|
#OUTPUT *** Error: Invalid source filename ***
]
#UNFRAME
The #EXTRACTV call that performs the write operation clears the contents of
read_var and write_var. TACL moves a record out of read_var and into
write_var. After TACL writes the data, TACL deletes the record from
write_var.

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