|
Thanks, I feel better now... I was feeling kinda low there, getting the lecture and all. :)) Michael Schutte Work 614-492-7419 email michael_schutte@xxxxxxxxxxxx "Bob Cozzi" <cozzi@xxxxxxxxx> Sent by: To rpg400-l-bounces@ "'RPG programming on the AS400 / midrange.com iSeries'" <rpg400-l@xxxxxxxxxxxx> cc 04/12/2006 04:04 Subject PM RE: Mod 10 check digit calculation Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> 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. -- 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 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.