How Agile Business Suite Handles Extract Files at Runtime

The way Agile Business Suite handles an Extract file at runtime is influenced by:

A first access is defined as the first execution of a Determine Actual, Sort, Extract, or Match command in the logic of the Report, or following a SetTitle or Restart command.

The following accesses are performed on an Extract file:

The following describes the points listed above in detail. For the purpose of describing how the category of an extract file influences how it is opened and closed implicitly, there is no discussion on extract file built-in methods.

Start of Report

At the beginning of the Report, any Extract files referred to in a RAS command option (RetainAs or RetainedAs) have their category set to PERMANENT and their title set to the last RAS command option in the logic of the Report. All other Extract files have their category set to TEMPORARY.

At the beginning of the Report, any Extract files that are file-equated at runtime have their title set to the title given in the file equate. A file-equated title overrides one that would have been assigned as a consequence of the RAS command. If the RAS command option has been used in logic for the extract file, the category of the file is set to PERMANENT, otherwise it is set to TEMPORARY.

Any SetTitle command has no effect on the Extract file category at the beginning of the Report, since this command only takes effect when it is executed.

No files are actually opened until they are first accessed by the execution of a Determine Actual, Sort Extract or Match command.

A first access is defined as the first execution of a Determine Actual, Sort Extract or Match command in the logic of the Report, or following a SetTitle or Restart command.

Generally speaking, the title set up by a SetTitle command replaces a title that has been set up by the RetainAs command, or assigned by a file-equate, when it is executed. The exception to this rule is in the case where all of the following conditions are met:

In such cases, the title assigned by a file-equate takes precedence and the SetTitle command is ignored. This exceptional behavior is a consequence of the way the RetainAs command has been implemented in AB Suite for systems migrated from EAE. For systems migrated from EAE, the RetainAs command is now a SetTitle command, inserted by migration, at the beginning of logic. To allow file-equates to be used with extract files on which the RetainAs command has been used, this behavior is necessary.

Write (Extract Command Execution)

The Extract command attempts to write a record to the specified Extract File.

Refer to Extract logic command in the Agile Business Suite Programming Reference Manual and the Extract File Location property in the Agile Business Suite Developer User Guide for more information.

Read and Compare (Determine Actual and Match Command Execution)

The action performed on the specified Extract file when a Determine Actual or Match command is executed depends on whether or not the ExtractedAs command option is included.

With ExtractedAs

The Determine Actual or Match command attempts to read a record from the specified Extract file. The ExtractedAs command option implies that the file was not created by this Report (that is, the Report does not include an Extract command which writes the file and defines the layout).

Without ExtractedAs

The Determine Actual or Match command attempts to read a record from the specified Extract File. Not including an ExtractedAs command option implies that the file was created by this Report (that is, the Report includes an Extract command that writes the file and defines the layout).

Sort (Sort Method)

The Sort method attempts to sort the specified Extract file.

Name (SetTitle Command Execution)

The SetTitle command explicitly closes the specified Extract file and changes the physical name of the file. The file category is changed to PERMANENT if the Exist command option is not included, or to EXISTING if the Exist command option is included. The new file is not opened until it is accessed by a command that reads or writes it.

On entry to the SetTitle command:

The following table shows the actions performed on the Extract file on entry to the SetTitle command.

State of file

TEMPORARY

PERMANENT

EXISTING

File exists

Deleted

Closed/Cleared

No action

File does not exist

No action

Created

Closed

Restart (Restart Command Execution)

The Restart command deletes the specified Extract file. The file name and category are unchanged. The next access of that file is treated as the first access to it.

End of Report

At the end of Report execution, if the Report includes an Extract command for an Extract file:

The following table shows the actions performed at end-of-job on Extract files for which an Extract command was included.

State of file

TEMPORARY

PERMANENT

EXISTING

File exists and has been accessed

Deleted

Closed

Closed

File exists and has NOT been accessed

Deleted

Cleared

Closed

File does not exist

No action

Created

No action

If the Report does not include an Extract command for an Extract file: