When you import application data, you can select the data records to be imported according to their content.
The conditions defined here can be negated with NOT, linked with AND and OR, or encapsulated as required. The Loader evaluates the operators accordingly.
<condition> ::=
<simple_condition>
| (<condition>)
| <condition> AND <condition>
| <condition> OR <condition>
| NOT <condition>
<simple_condition> |
POS <field_pos> <field_format> [HEX] <compare_operator> '<valLITERAL>' |
<field_pos> |
|
<field_format> |
The data type only has to be specified if the affected data field is to be read or output with a data type other than CHAR. Every internal database column format in the database can be read and output in CHAR format. |
HEX |
You can define HEX values. |
<compare_operator> |
< | > | = | <= | >= | != |
<valLITERAL> |
Constant |
IMPORT TABLE hotel.room
IF POS 06-11 =
'double'
DATA INSTREAM FILE 'room.data' FORMATTED
hno 01-05
type 06-11
free 12-15
price 16-22
You only import those data records from the room.data source data stream into the ROOM table in which double is specified as the room type.
The Loader distinguishes between simple conditions (simple_condition) and compound conditions. Simple conditions can be negated with NOT, combined with AND and OR to form compound conditions, or encapsulated as required.
Operators in parentheses are evaluated before those that are not in parentheses.
If no operators are in parentheses, the Loader weights them as follows:
· NOT takes precedence over AND and OR
· AND takes precedence over OR
· If the weighting is identical, the operators are evaluated from left to right.
Only those records to which the simple or compound condition applies are imported.
You use the syntax rule simple_condition to define the selection criterion that determines which records from the data stream are imported to which target table. The data records that you want to import are selected by comparing them to a constant.
As with the other fields in a data record, you use the position of a value that you want to compare to describe it. You only need to specify the external data type of this value if the data type is not CHAR.
You specify a constant as a plain text value and place it in quotation marks. The constant is converted to the data type of the value that you want to compare in the data record.
If the constant you want to use as a comparison value is a number, it must have a valid number format. That is, it must be a floating point number in mantissa/exponent notation or a fixed-point number with the currently defined decimal representation or the default decimal representation in the Loader.
See also: