Usage > Imports / exports > Exports 

This function is used to extract the data from the database to an ASCII type file (with fixed length or variable with separators), whose structure is described by an import/export template. This export can be total or chronological, that is to say it will only export the data modified since the last export of this type.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Entry screen

Presentation

At the launch of the function, this screen is used to enter the parameters related to the export to be launched.

Close

 

Fields

The following fields are present on this tab :

Block number 1

Corresponds to the implemented import-export template.

  • Chrono management (field CHRONO)

If this checkbox is activated, the export is only carried out on the records modified since the last export. The operating principle of this export mode is the following:

  • an adonix counter (numerical variable common at a given moment to all the workstations of a folder, stored in the database, with the name [C]EXPORT), serves as a time basis (it is incremented each time an export with event management is launched).
  • the current value of the counter [C]EXPORT) is picked up in the records of the database when a creation or an update is carried out. This mechanism applies to all the tables used to perform a chronological export (all the database tables and transaction headers include this field: this represents nearly half the tables in the database). The corresponding field is called EXPNUM.
  • during the chronological export, the current value of the EXPORT counter is stored in the import/export template, then it is incremented and are exported only those records in the database with an EXPNUM field value smaller than or equal to the EXPORT field value before incrementation, and strictly bigger than the last value previously stored in the template.

When an export with event management is carried out, it is possible to use the # meta-character in the name of the file to be exported; this character is then replaced by the current value of the EXPORT counter formatted over 4 characters. Thus, the file name donnees#.asc will be replaced by donnees00001.asc, donnees00023.asc, etc., based on the counter value.

Of course, the EXPNUM field must exist in the table linked to the exported object for this type of import to exist. If it exists, it is automatically entered by object management, therefore it can be used for exports of this type.

The current value of the [C]EXPORT counter can be modified in the import-export parameters.

File generation

  • field TYPEXP

 

  • Data file (field VOLFIL)

 

Grid Range

  • Field (field BNOM)

This field defines the name of the field for which a range can be entered.

  • Start (field BDEB)

Used to enter lower and upper ranges on a group of fields of the template, in order to limit the data to be exported. If this range is not assigned, no filtering is carried out on the field concerned.

  • End (field BFIN)

 

Grid Criteria

The tables used in the import/export template are listed here to enable the filtering of the exported data.

  • Selection criterion (field CRITERE)

Used to define additional criteria to filter the data to be exported for the table concerned, in the form of logical expressions that must be checked and that can use the table fields.

Close

 

Batch task

This function can be run in batch mode. The standard task EXPORT is provided for that purpose.

Specific Buttons

The following fields are included on the window opened through this button :

Grid

  • field LIGNE

Contains the lines in the process.

Close

Leads to the display of the data decoding process, coming from the template, that will be executed (this process is named WWE#####, where ##### is an automatically assigned number).

A window then opens, that is used to view or modify this process, before the launch of the execution by the corresponding button or the abandonment of the import launch.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Destination file exists, delete (Yes/No)

The file to be exported exists already : if confirmed, the previous file will be erased by the result of the export.

Non existent directory

The directory in which the file to be exported is to be written does not exist.

Export impossible with this template

The template cannot be used for an export.

Tables used

SEEREFERTTO Refer to documentation Implementation