Extract File Variant

Syntax

DETERMINE ACTUAL <variant> [ GS status ]
   <logic_block>
END | ENDEXIT | ENDNOPRINT
<variant> := <databaseVariant> | <extractFileVariant> | <sqlVariant>
<extractFileVariant> := extract_file EXTRACTEDAS { records | EVENT } 
RETAINEDAS file_name

Parameters

The extract file to read. This extract file must have been previously saved using an Extract logic command.

Description

The extract file variant of the Determine Actual logic command reads class records into memory from an extract file.

Set the Record built-in segment attribute to the record to start reading from. This should be set before the Determine Actual logic command is executed.

The behavior of the Determine Actual (or Match) logic command when reading an extract file is influenced by:

A first access is defined as the first execution of any Determine Actual, Match, or Extract 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 behavior the Determine Actual (or Match) logic command also depends on the presence of the ExtractedAs command option.

EXTRACTEDAS

If the ExtractedAs command option is specified, it implies that the file was not written by this report (the report does not include an Extract logic command that writes the file and defines its layout). The Determine Actual (or Match) logic command attempts to read a record from the specified extract file in the following mode:

Note: The read of the empty Temporary extract file sets the Glb.Status built-in segment attribute to "*****".

If the ExtractedAs command option is not specified, it implies that the file was written by this report (the report includes an Extract logic command that writes the file and defines its layout). The Determine Actual (or Match) logic command attempts to read a record from the specified extract file in the following manner:

Note: The read of the empty Temporary or Permanent extract file sets the Glb.Status built-in segment attribute to "*****".

Example

This example creates an extract file that lists all customers with balances over $1000. This file is sorted, and might be used by other reports.

If no customers exist with a balance over $1000, the CustFile extract file is created as an empty file. This ensures that the customer records from a previous run are not processed.

SetTitle FileA "CustFile"
LookUp Every Cust
     If Cust.Balance > 1000
          Extract Cust As FileA
     End
End
FileA.Sort(Key(FileA.Cust.Balance,“Ascending”))
Determine Actual FileA
     Frame10.Print()
End