× 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.



In programming 

Z= X MOD Y 
Is the same (in RPG IV) as: 
Z = %REM(X:Y);

-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 Michael_Schutte@xxxxxxxxxxxx
Sent: Wednesday, April 12, 2006 3:41 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Mod 10 check digit calculation

Adam you're right, MOD is short for Modulus.

I assumed he wanted arithmetic... didn't read the whole email.

http://www.antilles.k12.vi.us/math/cryptotut/mod_arithmetic.htm

Anyway, I do have a procedure that does the checkdigit for credit cards,
but it's ugly.

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


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




I was also confused (having done math recently and not having used this
algorithm before).  I was curious and found out that this algorithm is
actually called the LUHN algorithm
(http://en.wikipedia.org/wiki/Luhn_formula).

Bob - I always thought 'mod' was just short for 'modulus'.

Hope this helps the other who were confused,
Adam

Alan wrote on 12/04/2006 04:24:22 PM:

>
> I realized that there was some misunderstanding, but I was only using
the
> phraseology that I have been using in the banking and manufacturing
> industry, both in the U.S. and the U.K. for the last 30 years.
> Hmmmm - just re-read that. 30 YEARS. THAT explains these grey hairs
>
> Anyway - sorry for any misunderstandings I have caused.
>
> Alan
>
>
>
>              "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.
>
> --
> 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.
>

################################################################################
#####

Attention:
The above message and/or attachment(s) is private and confidential and is
intended
only for the people for which it is addressed. If you are not named in the
address
fields, ignore the contents and delete all the material. Thank you.

For more information on email virus scanning, security and content
management, please contact administrator@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.