The system function SysLib.calculateChkDigitMod10 places a modulus-10 check digit in a character item that begins with a series of integers.
SysLib.calculateChkDigitMod10( text anyChar inOut, checkLength SMALLINT in, result SMALLINT inOut)
This item has 4 digits and is either of type SMALLINT or is of a type BIN, with no decimal places.
You can use SysLib.calculateChkDigitMod10 in a function-invocation statement.
SysLib.verifyChkDigitMod10 (myInput, myLength, myResult);
8 x 2 = 16 4 x 2 = 8 7 x 2 = 14
1 + 6 + 8 + 1 + 4 + 1 + 3 + 2 = 26
30 - 26 = 4
If the subtraction yields 10, the check digit is 0.
1734284
Related concepts
Syntax diagram for EGL functions
Related reference
EGL library SysLib