IBM InfoSphere DataStage, Version 11.3.1
MOD function
Syntax
MOD (dividend, divisor)
Description
Use the MOD function to calculate the value of the remainder after integer division is performed on the dividend expression by the divisor expression.
The MOD function calculates the remainder using the following formula:
MOD (X, Y) = X - (INT (X / Y) * Y)
dividend and divisor can evaluate to any numeric value, except that divisor cannot be 0. If divisor is 0, a division by 0 warning message is printed, and 0 is returned. If either dividend or divisor evaluates to the null value, null is returned.
The MOD function works like the REM function.
Example
X=85; Y=3
PRINT 'MOD (X,Y)= ',MOD (X,Y)
This is the program output:
MOD (X,Y)= 1
Last updated: 2015-03-09
PDF version of this information: