At 09:19 PM 6/26/2014, Ronald C Peterson wrote:
Does anyone have a callable routine to generate a checksum for a text
value to be used in printing Code 128 barcodes on labels?
Ron,
Technically, a check digit (also called a checksum) is used to assure
accuracy; to "check" for errors. In general check digits are a single
digit computed from the other characters in the string of numbers.
Calculating the UPC check digit involves an unusual algorithm and fun.
Want to give it a try? Grab a pencil!
For example, the Barcode data is 69277198116.
Add the digits in the odd-numbered positions (1st, 3rd, 5th, etc.)
together and multiply the total by three.
6+2+7+9+1+6=31 31x3=93
Add the digits in the even-numbered positions (2nd, 4th, 6th, etc.).
9+7+1+8+1=26
Add the two results together.
93+26=119
Now what single digit number makes the total a multiple of 10? That's
the check digit.
119 + 1 = 120
1 is the checkdigit for 69277198116.
The full UPC number is now 692771981161.
Once you understand the technique, you should be able to either create
a Stored Procedure, Form Action, or Before Generate Custom EEP for any
Report or Label Band to calculate the value to be used in printing Code
123 Barcode.
Have fun!
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================