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



Tried several variations. Don't know what to do with that odd character. The process, as explained to me, was to do the bulk in code c and switch to B for the odd digit. The example I have are of only code b. But, that example shows the sstart b is included in the total, with no multiplier.

I wish I had something that explained this. My web searches may not have been good. I found nothing, so far, on dealing with odd length numeric strings. ate a code128 mode c, and it would not take an odd length, or anything but numbers.

Do you have any suggestions for how to deal with the odd length, or references I can study?

John McKee
-----Original message-----
From: "Harman, Roger" Roger.Harman@xxxxxxxxxx
Date: Thu, 28 Jul 2011 13:47:31 -0500
To: "'Midrange Systems Technical Discussion'" midrange-l@xxxxxxxxxxxx
Subject: RE: Barcode Code 128 check digit calculation

I've done check digit calcs for UPC and ISBN but never Code 128. Your example is interesting in that you have an odd # of digits so you're doing a switch from 128C to 128B for the last digit.

I'd suggest a bit more research on the algorithm, specifically with a code switch, but right off the bat, it appears that, at minimum, you are not multiplying the value of the 7 (23) by its position in the string.

I haven't looked at the algorithm in detail so I don't know if the code switch counts as a position or not, but you do need to multiply each character by its position - as you did with the '34' & '56' value.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Thursday, July 28, 2011 10:42 AM
To: Midrange Systems Technical Discussion
Subject: Barcode Code 128 check digit calculation

I'm not understanding how to compute the check digit for a code 128 type c bar code,

First, I guess, is this simple question: Does the DDS BARCODE keyword have an option to do this? We are on (stuck at) v5r4. I didn't see anything that would generate the check digit. I have a sample, printed, of a 7 digit number (1234567).

My efforts, thus far, have been:

Move 105 to a counter (start type c)
Add 12.
Add product of (34 * 2)
Add product of (56 * 3)
Add 104 (start type c)
Add 23

Divide counter by 103, use remainder to look up the check digit.

The resulting bar code (compared to my reference) is missing some bars on the right side, like a digit. But, what is missing?

Can anybody shed some light on this for me?

Thanks,

John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.