When you load application data, you can select the data records 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.
See also:
You want to load only those data records from the source data stream hotel.data into the target table hotelthat satisfy the following conditions:
The price in the data record is less than
400.00 (IF).
The name of the
hotel is not City (NOT).
The hotel is located
in BERLIN (AND).
The zip code is
13125 or 13126 (OR):
DATALOAD TABLE hotel
IF POS 41-44 REAL < '400.00'
AND
POS 27-36 = 'BERLIN'
AND
(POS 20-25 = '13125' OR POS 20-25 =
'13126')
AND NOT
POS 09-18 = 'City'
hno 01-04
INTEGER
name 09-18
zip 20-25
DECIMAL
city 27-36
price 41-44 REAL
INFILE 'hotel.data' FORMATTED
You want to load only those data records from the source file hotel.data into the target table hotel where the price is not more than 400.00:
DATALOAD TABLE hotel
IF
NOT POS 41-44 REAL >
'400.00'
hno 01-04
INTEGER
name 09-18
zip 20-25
DECIMAL
place 27-36
price 41-44 REAL
INFILE 'hotel.data' FORMATTED