210 Chapter 5
Storing and Retrieving Test Results
Using the To/From File Objects
Using the To/From File Objects
The To File and From File objects read data to and from files based on
I/O transactions. They have the following characteristics:
n A data file is opened on the first
READ or WRITE transaction. When the
program ends, VEE closes any open files automatically.
n VEE maintains one read pointer and one write pointer per file regardless
of how many objects are accessing the file. The read pointer identifies the
next data item to be read, and the write pointer indicates where the next
data item should be written.
n The
To/From File objects can append data to existing files or
overwrite them. If the
Clear File at PreRun & Open setting is
checked in the open view of the
To File object, then the write pointer
starts at the beginning of the file. If not, the pointer is positioned at the
end of the existing file. Each
WRITE transaction appends information to
the file at the location of the write pointer. If an
EXECUTE CLEAR
transaction is performed, the write pointer moves to the beginning of the
file and erases its contents.
n A read pointer starts at the beginning of a file, and advances through the
data depending on the
READ transactions. You may perform an EXECUTE
REWIND
in the From File object to move the pointer back to the
beginning of the file without affecting any data.
Note The To File object is also described in “Using Data Files” on page 87 of
Chapter 2, “Agilent VEE Programming Techniques.”