× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Also called Modulo 10 and 11. However "Mod 10" and "Mod 11" are the common terms; if you google either one, you'll get a list of pages showing how to derive the check digit, as will googling (is that in the OED yet?) "Modulus 10".


Aside from bank transactions, I haven't seen it used these days. In keypunch days gone by, though, it was heavily used (I preferred the Mod 11) to help prevent data entry errors. And was referred to then as Mod 11.


But I learned something new today, too. Didn't know "mod" meant "remainder". My (decidedly abridged) dictionary only lists "mod" as short for "modern".

Mostly I'm curious why Alan would need a process that would work over a varying size field. Typically check digits are used on fixed length things, such as item number, account numbers, etc., which have fixed lengths.



        * Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Bob Cozzi wrote:

Maybe if you said MODULUS instead of MOD, people would realize that you mean
Modulus in instead of "mod" which means "remainder"

-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of Alan Shore
Sent: Wednesday, April 12, 2006 2:18 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Mod 10 check digit calculation


Hi Michael
Mod 10 check digit calculation is where you start with a number, lets say
1234567890. Each of the digits is then multiplied by either 1 or 2
depending upon its position, with the low-end position being multiplied by
2, then the next position to the left, being multiplied by 1, then the next
position to the left, being multiplied by 2,  then the next position to the
left, being multiplied by 1, etc.
For this example 1234567890 becomes
1 x 1 = 1
2 x 2 = 4
3 x 1 = 3
4 x 2 = 8
5 x 1 = 5
6 x 2 = 12
7 x 1 = 7
8 x 2 = 16
9 x 1 = 9
0 x 2 = 0
These answers are then accumulated, in this instance 1 + 4 + 3 + 8 + 5 + 12
+ 7 + 16 + 9 + 0 = 65
The last digit of this answer (5 of 65) is then subtracted from 10, giving
the answer 5
Therefore the check digit for the number 1234567890 is 5
This is how the check digit for a bank account number is calculated.

I quickly wrote this down, and I'm pretty sure this is the correct way to
do the Mod 10 check digit calculation.

Again, if anyone can help, much appreciated



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx



Michael_Schutte@b obevans.com Sent by: To rpg400-l-bounces@ RPG programming on the AS400 / midrange.com iSeries <rpg400-l@xxxxxxxxxxxx> cc 04/12/2006 03:04 Subject PM Re: Mod 10 check digit calculation Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com>



You want a mod 10 calculation of a number right?


11 mod 10 = 1

%Rem(11:10) = 1

Am I missing something?

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.