|
1. Starting from the left, add all the ODD positions into SUM1. 2. Multiply SUM1 * 3 3. Starting from the left, add all the EVEN positions into SUM2 4. Add the product from step 2 above + SUM2 (ie (SUM1*3) + SUM2) 5. The modulo 10 check digit is the number when added to the result in step 4 gives the next higest multiple of 10. If the sum from step 4 was 83, the check digit is 7. I have a routine somewhere, however it is pretty simple to write. HTH, Carl Carl Galgano EDI Consulting Services, Inc. 540 Powder Springs Street Suite C19 Marietta, GA 30064 770-422-2995 mailto: cgalgano@ediconsulting.com http:cgalgano.home.mindspring.com EDI, Communications and AS400 Technical Consulting -----Original Message----- From: Jeff Crosby <jlcrosby@fwi.com> Newsgroups: as400.general,comp.sys.ibm.as400.misc To: Midrange List Server (David Gibbs) <MIDRANGE-L@midrange.com> Date: Tuesday, December 15, 1998 9:33 AM Subject: UPC Check Digit Algorithm > >Does anyone know where I can find the algorithm to calculate a UPC check >digit? > >Or better yet, already have the routine written in RPG? > >Thanks. > >-- >-Jeff > >jlcrosby@fwi.com >+--- >| This is the Midrange System Mailing List! >| To submit a new message, send your mail to MIDRANGE-L@midrange.com. >| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. >| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. >| Questions should be directed to the list owner/operator: david@midrange.com >+---
BEGIN:VCARD VERSION:2.1 N:Galgano;Carl;J. FN:Carl J. Galgano ORG:EDI Consulting Services, Inc. TEL;WORK;VOICE:770-422-2995 TEL;PAGER;VOICE:770-839-8168 TEL;WORK;FAX:770-425-8391 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;540 Powder Springs Street=0D=0ASuite C19;Marietta;GA;30064 LABEL;WORK;ENCODING=QUOTED-PRINTABLE:540 Powder Springs Street=0D=0ASuite C19=0D=0AMarietta, GA 30064 URL: URL:http://cgalgano.home.mindspring.com EMAIL;PREF;INTERNET:cgalgano@ediconsulting.com REV:19981215T161745Z END:VCARD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.