The behavior of the Extract logic command when writing an extract file is influenced by:
The category of the extract file (Temporary, Permanent, or Existing). Refer to Extract File Categories for more information on extract file categories.
Whether the extract file has previously been accessed.
An extract file access is defined as the execution of any Determine Actual, ForEach, Extract, or Match logic statement, or Sort method invocation for a specific extract file, either in the logic of the report, or following a SetTitle or Restart logic statement.
The Extract logic command attempts to write a record to the specified extract file in the following manner:
If the extract file has previously been accessed, extracted data is appended to the existing file.
If the extract has not previously been accessed, the behavior of the Extract logic command also depends on the category of the extract file, as listed in the following table.
File Status | Temporary File | Permanent File | Existing File |
---|---|---|---|
File exists | Cleared | Cleared | Cleared |
File does not exist | Created | Created | Created |
Upon report termination, the behavior of the Extract logic command depends on the category of the extract file and whether has previously been accessed, as listed in the following table.
File Status | Temporary File | Permanent File | Existing File |
---|---|---|---|
Not accessed | Deleted | Cleared | No action |
Accessed | Deleted | Closed | Closed |