The LOAD
WHEN
condition_spec
clause is used to identify the records that should be passed to the database. The evaluation method varies:
If the condition_spec
references a field in the record, then the clause is evaluated only after all fields have been parsed from the record, but before any NULLIF
or DEFAULTIF
clauses have been evaluated.
If the condition specification references only ranges (and no field names), then the clause is evaluated before the fields are parsed. This is useful for cases where the records in the file that are not to be loaded cannot be parsed into the current record definition without errors.
See "condition_spec".
The following are some examples of using LOAD
WHEN
:
LOAD WHEN (empid != BLANKS) LOAD WHEN ((dept_id = "SPORTING GOODS" OR dept_id = "SHOES") AND total_sales != 0)