At 14:29 -0500 on 02/18/2014, Gerhard Postpischil wrote about Re:
Packed decimal (again!):
You're wrong about math use with credit card numbers. The leading
three/four digit identify the bank, and the last digit is a checksum
calculated from the remaining 8/9 digits.
The first digits also can identify the card type. For example a CC
card number beginning with 34 or 37 is an AMEX Card, 4 is a VISA, and
50 to 55 means Master Card. See
<http://en.wikipedia.org/wiki/Credit_card_number> for more details
and prefixes. This prefix check is often used on Web Sites as a first
check when you have a check box for card type to reject entered card
numbers that have the wrong prefix (such as checking VISA but
entering a 54... [ie: Master Card] card number) before actually
computing the check digit to fully validate that it is in the valid
format.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN