You can use the Lookup
function to verify that a key value exists in a lookup table. You
can specify the Lookup function in condition expressions only. Specify
the Lookup function as the expression for the term whose value is
the lookup key that you want to search for. The syntax of the Lookup
function is as follows:
Lookup ("lookup_table_name")
For lookup_table_name,
specify the name of the lookup table that you want to search.
For example, if you
want to verify that the value of the term Ctry_Key exists as a key
value in the table Country_Codes, enter the Lookup function as the
expression for the Ctry_Key term as shown in the following display.
The Lookup function
returns a value of True or False,
depending on whether the key value exists in the lookup table. For
example, suppose the Ctry_Key column in the current input record contains
the value “CA”. If the Country_Codes lookup table contains
the lookup key “CA”, then the expression shown in the
display above evaluates to True.
Note: If an expression contains
the Lookup function, then the expression cannot contain anything else.