To use conditions in the exchange module

The exchange process can be manipulated by using conditions at different levels in an exchange scheme.

Conditions are used for two purposes:

  • To specify if records must be imported (true/false type condition).
  • To calculate field values during export or import (value type condition).

Conditions are used in table relations and field relations. Table relation conditions specify the conditions for adding, updating, or deleting rows during the import process. Field relation conditions are used to calculate field values during the import/export process.

A condition is defined in a condition script using the text editor. The script contains LN 4GL commands, that can include declarations, database actions, assignments, and conditions. Specific variables and functions are available for condition scripts. These variables are listed in the Predefined Functions/Variables (daxch0510s000) session.

If conditions are used for data import, all the ASCII fields are already available for use in the script and contain the values from the current ASCII record.

If conditions are used for data export, all the fields from the LN table are available and contain the values from the current record of the LN table.

Duplicate command

If a condition is copied, the condition script is also copied. The condition script text is actually copied to a different text number. Therefore the new condition script can be changed without affecting the original script.