Syntax Rules for Table Descriptions
<simple_condition> ::= POS <field_pos > <field_format > [HEX] <compare_operator > '<valLiteral>'
valLITERAL |
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.
You use this syntax rule to define the selection criterion that determines which records from the data stream are loaded to which target table. The data records that are you want to load are selected by comparing them with a constant.
You want to load only those data records from the source data stream hotel.data where the price is less than 400.00 to the target table hotel:
DATALOAD TABLE hotel
IF POS 41-44 REAL < '400,00'
hno 01-04
INTEGER
name 09-18
zip 20-25
DECIMAL
city 27-36
price 41-44 REAL
INFILE 'hotel.data' FORMATTED