The LOOKUP Function
The LOOKUP function, used in FOCUS MODIFY procedures, retrieves data values from
cross-referenced tables joined dynamically with the JOIN command. The function is valid in
both MODIFY COMPUTE and VALIDATE commands.
The syntax for the LOOKUP function is
rfield/I1 = LOOKUP(field);
where:
- rfield
- Contains the return code (1 or 0) after the LOOKUP function executes.
- field
- Is the name of any field in a cross-referenced table. After the LOOKUP, this fieldname
contains the field's value for you to use as needed.
To use this feature most efficiently with an RDBMS, specify a cross-referenced field for
which an RDBMS index has been established.
Note:
- The LOOKUP function is not supported between RDBMS tables and FOCUS data sources in either direction.
- The extended syntax of the LOOKUP function (parameters GE and LE) is not valid for RDBMS tables. LOOKUP can only retrieve values that match exactly. Refer to your FOCUS documentation for more information.