CAS 6


lookup
- Miscellaneous

Summary

Populate a field by looking up values in another CAS file (the 'Lookup file') or data table (the Lookup table).

Description

For example, if you have a file that contains states and maximum prepayment penalties allowed (two fields STATE and MAXPENALTY) you can create the edit/error expression to test for valid prepayment penalties.: lookup 'c:\file.cas' 'FIELD1' -

Read extenal field without key

Examples

PENALTY gt (STATE lookup 'c:\subdir\file.cas' 'STATE' 'MAXPENALTY') 
RATING lookup 'RATING' 'RATING' 'MOODY'

Syntax

(CurrentKey) lookup 'SourceName' ('KeyField') 'ReturnValue'

Left Arguments

Name Data Type Input Type Description Optional Default
CurrentKey Text Field, Constant Key field in active CAS file Yes

Right Arguments

Name Data Type Input Type Description Optional Default
SourceName Text Constant Name of other CAS file or table in current file. Yes
KeyField Text Constant Name of key field in other cas file Yes
ReturnValue Text Constant Name of field containing values to return No

Result

Type: Text

Return values corresponding to current key



Build 6.0.624