Populate a field by looking up values in another CAS file (the 'Lookup file') or data table (the Lookup table).
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
PENALTY gt (STATE lookup 'c:\subdir\file.cas' 'STATE' 'MAXPENALTY')
RATING lookup 'RATING' 'RATING' 'MOODY'
(CurrentKey) lookup 'SourceName' ('KeyField') 'ReturnValue'
Name | Data Type | Input Type | Description | Optional | Default |
---|---|---|---|---|---|
CurrentKey | Text | Field, Constant | Key field in active CAS file | Yes |
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 |
Type: Text
Return values corresponding to current key