USFile Internal Component
The USFile internal component provides basic file-IO functionality. Text files can be kept open for a period longer than a single statement, making it possible to write to the file using multiple write statements. It is also possible to append the output of an XML.Export statement to a file which is opened with this USFile component.
This script opens a file, writes data to it, then closes the file:
INVOKE USFile.Open WITH
, 'WRITE' "Mode"
INVOKE XML.Export WITH
SELECT 'MyFile' WriteOutputTo
WHERE destination = 'AUSTRALIA'
INVOKE USFile.Close WITH
The USFile component provides methods to:
•Open a text file for reading, writing, or appending.
•Write text or binary data to a file.
•Read lines or a complete binary or text file.
•Check if the end of a file has been reached when reading lines.
•Close a file.
The USFile internal component has the following methods: