Script functions reference > Script functions in alphabetical order > M > Mod10L

Mod10L
Syntax
Mod10L(str)
str 
Description
Calculates a length check digit and a Luhn check digit. First the length check digit is calculated (length plus 2, mod 10). Then, to calculate the check digit, the length check digit is added at the end of the string and a pad 10-based check digit calculation (same as for Mod10) is performed. Both the length check digit (first) and the pad 10-based check digit are included in the returned result.
Returns
A string specifying a two-digit number consisting of a length check digit and a Luhn check digit.
Example
{
$noterefnr = "1234567890";
$modlendig = mod10L($noterefnr);
$newnoterefnr = $noterefnr + $modlendig;
}
Result:
$modlending is "23"
$newnoterefnr is "123456789023"
OpenText StreamServe 5.6 Updated: 2013-03-01