Returns one value if a condition is true and another value if it is false.
Note: CAS comes with many functions that make complex if-then logic unnecessary.
For example, to make sure a calculation result is non negative use: 0 max AMOUNT1-AMOUNT2 instead of :if (0 < AMOUNT1-AMOUNT2)(AMOUNT1-AMOUNT2)(0)
if (ORIGINATOR in 'BANKA') (ORIGDATE mplus 360) (MATURITY)
if (MARGIN gt 0) ('A') ('F')
if ConditionExp ThenExp ElseExp
Name | Data Type | Input Type | Description | Optional | Default |
---|---|---|---|---|---|
ConditionExp | Text, Numeric, Boolean, Date | Field | Yes | ||
ThenExp | Text, Numeric, Boolean, Date | Field, Constant | Yes | ||
ElseExp | Text, Numeric, Boolean, Date | Field, Constant | Yes |
Type: Text, Numeric, Boolean, Date
Merged ThenExp ElseExp