The ISDEC (Is Decimal) function determines whether or not a source value is a decimal number. If the value is a decimal number, a true (1) is returned. Otherwise, a false (0) is returned.
Category
Boolean
Syntax
ISDEC(value)
Parameters and Descriptions
Parameter | Description |
---|---|
value | This parameter specifies the value to be tested to determine whether or not it is a valid decimal number. The value to be tested can be a field from a source datastore, a variable or the result of another Function. |
1 | 0 | Indicates whether a TRUE (1) or FALSE (0) was returned from the GT function. |
Example
Determine whether or not an employees annual salary (YR_WAGE) is a decimal number. If YR_WAGE is a valid decimal number, map it to target field YR_SALARY. Otherwise, map -1 to the target field.
IF ISDEC (YR_WAGE) = 1
{
TGT_DS.YR_SALARY = YR_WAGE
}
ELSE
{
TGT_DS.YR_SALARY = -1
}