[AccessD] adding control number

Gustav Brock Gustav at cactus.dk
Fri Sep 9 10:40:18 CDT 2005


Hi Pedro

Here's a typical explanation in human language on how to do this:

HP RPG/XL Utilities-Part 3 SIGEDITOR
Modulus 10 Self-Check Digit 

To calculate the Modulus 10 self-check digit, follow these steps:

1.  Multiply the rightmost position and every other position, moving to
the left, of the number by 2.

 Example:  If your number is 1 2 3 4 5 6 7, multiply the digits 7, 5,
3, and 1 by 2 to get the numbers 14, 10, 6, and 2.

2.  Add the digits of the products obtained from step 1 above to the
digits that were not multiplied.

 Example:  The products obtained from step 1 above are 14, 10, 6, and
2; the digits that were not multiplied are 2, 4, and 6.  
Add all these digits:  1 + 4 + 1 + 0 + 6 + 2 + 2 + 4 + 6 = 26.

3.  Subtract the value obtained in step 2 from the next higher multiple
of 10; the result is the self-check digit.

 Example:  The next higher multiple of 10 from the result 26 obtained
in step 2 above is 30.  Subtracting 26 from 30 gives the result of 4,
which is the self-check digit.

4.  The check digit is then appended to the right end of the number to
create the final result.

/gustav



More information about the AccessD mailing list