The DECREMENT function subtracts one (1) from a number. This function can be used to decrement a counter that may be used for tasks such as loop control.
Category
Mathematical
Syntax
DECREMENT(numeric_value)
Parameter and Description
Parameter | Description |
---|---|
numeric value | A numeric value from a source datastore field/column, user specified numeric value or the numeric result of another Function. |
Example
Decrement the source field COUNTER by 1 and map the result to target field RCDS_LEFT. Assume that the value of Counter, prior to the DECREMENT operation, is equal to 10.
TARGET_DS.RCDS_LEFT = DECREMENT (COUNTER)
Returns the value of 9.
Decrement the number 25 by 1 and map the result to target field DECR_VALUE.
DECR_VALUE = DECREMENT (25)
Returns the value of 24.