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


  • Subject: Re: UPC Check Digit Algorithm
  • From: "Kevin Watkins" <kevinw@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 15 Dec 1998 08:48:10 -0600

Jeff... The Uniform Code Council has this info on their web site at
http://www.uc-council.org/d08-a.htm

It looks like it is a mod-10 check digit. I have a called program that does
this for other purposes that you may be able to modify to your needs.
(change your font to fixed fonts)

0001.00      E*
0002.00      E                    M10        14  1 0
0003.00      E                    MW0        14  2 0
0004.00      E                    MX0         6  1 0
0005.00      I*
0006.00      I            DS
0007.00      I                                        1  140UNCHEK
0008.00      I                                        1  14 M10
0009.00      I                                        1  150CHEKED
0010.00      I                                       15  150CHECKD
0011.00      I                                       16  21 MX0
0012.00      I                                       16  210MX0RES
0013.00      C*
0014.00      C           *ENTRY    PLIST
0015.00      C                     PARM           PARM14 140
0015.01      C                     PARM           PARM15 150
0017.00      C*
0017.01      C           PARM14    IFGT 0
0018.00      C                     Z-ADDPARM14    UNCHEK
0018.01      C                     END
0018.02      C           PARM15    IFGT 0
0019.00      C                     Z-ADDPARM15    CHEKED
0019.01      C                     END
0020.00      C*
0021.00      C           2         DO   14        M0      20
0022.00      C           M10,M0    MULT 2         MW0,M0
0023.00      C                     END  2
0024.00      C*
0025.00      C           1         DO   13        M0
0026.00      C                     Z-ADDM10,M0    MW0,M0
0027.00      C                     END  2
0028.00      C*
0029.00      C                     Z-ADD0         WK0010  10
0030.00      C           1         DO   14        M0
0031.00      C                     Z-ADDMW0,M0    MX0RES
0032.00      C                     XFOOTMX0       WK0020  20
0033.00      C                     ADD  WK0020    WK0010
0034.00      C                     END
0035.00      C*
0036.00      C           10        SUB  WK0010    WK0010
0037.00      C                     Z-ADDWK0010    CHECKD
0038.00      C**
0040.00      C                     Z-ADDCHEKED    PARM15
0041.00      C                     RETRN

-----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 8:46 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
>+---

+---
| 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
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.