Searches a lookup table (an array) for a key value and returns the corresponding text string.
Name of the lookup table. This table must be previously loaded with LOAD-LOOKUP.
String variable into which to return the corresponding value.
Speeds up processing for long reports. For example, to print the entire state name rather than the abbreviation, use LOAD‑LOOKUP followed by LOOKUP.
The following example works in conjunction with the example for LOAD-LOOKUP:
lookup states &state_abbr $state_name
This example searches the states lookup table for a matching &state_abbr value; if found, it returns the corresponding state name in $state_name. If not found, a null is placed in $state_name.