New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

Issues Generating IMpb (GS1-128) Barcode for USPS


I am making use of the IDAutomation Code 128 Font Package and an encoder in my project. I am having some issues generating properly scannable USPS IMpb barcodes.

I have a multi-step process for processing mailing lists, where I process, resort, and generate the IMpb barcodes in a program called AccuZIP. I then feed the output into a mapping program using the IDAutomationC128L font to print the final document.

Could you offer any assistance on the subject?

Operating System: Windows

Application: IDAutomation Code 128 Fonts, AccuZIP

10-24-16     7.9 year(s) ago    

  Report Abuse

 

James

Best Answer

Thank you for the clarification. It seems that your company is using a Visual FoxPro (VFP) translation of a Code 128c encoding function.

GS1-128 requires:
• The Code 128 ‘Auto’ function (or its VFP equivalent*) is used.
• The ApplyTilde parameter is enabled.
• The data to be formatted using a method (parentheses, Tilde, or Direct encoding).

GS1-128 uses Application Identifiers (AI). GS1 mandates (besides the initial AI) that the fixed AIs go first (without parentheses surrounding them), then the variable AIs go last, with parentheses surrounding them.

Example:
These are arbitrary AIs - refer to gs1.org for specifics - this is to show the general idea.

Given the AIs are:
• 01:
o AI Type: Fixed
o Data: 2345

• 02:
o AI Type: Fixed
o Data: 767

• 03:
o AI Type: Variable
o Data: 99999

• 04:
o AI Type: Fixed
o Data: 8888888


Proper GS1 DataToEncode (AIs in bold for clarification): (01)234502767048888888(03)99999

Helpful IMpb formation information: USPS GS1-128 IMpb FAQ & Tutorial

*IDAutomation does not publish a VFP version of Code 128 ‘Auto’ function (the one without the a, b, or c in the name), but your team can adapt it from the VBA Font Encoder source code (although we cannot troubleshoot converted or custom code). The function definitions may be found in the VBA page’s Barcode Functions tab.

When generating GS1 symbols, IDAutomation recommends testing the result with the Barcode Decoder App which parses out GS1 data to verify proper encoding.

Posted 7.8 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (7)
Hard to say. What I can suggest is that your team make sure they correctly port over the code and perform comparison tests (in Excel and in VFP) to get the same outcome for the same data.

Posted 7.8 year(s) ago

(0)
(0)
   Report Abuse
Thank you, James, I shall relay this information.

So this should be the cause of the incorrect mod103s?

Posted 7.8 year(s) ago

(0)
(0)
   Report Abuse
The datasource is FoxPro DBF format. I encoding is performed when I am exporting it to a tab-delimited Txt file.

Posted 7.9 year(s) ago

(0)
(0)
   Report Abuse
They did not get back to me about the datasource, but from looking at the program, it would appear that it is using a database.

• Which IDAutomation font encoder you are using:

The licensed IDAutomation Font that we use is called IDAutomationC128.


• Please post the full font encoder function call (including properties):

[Support Note: this section has been reformatted for clarity]

- Sample Input: pcDataToEncode(4209020293269899240000000000000113)
- Resulting string used with IDAutomationC128L: ÍJ)""}:ÆÇ8ÂÂÂÂÂÂ!-UÎ
- Scanned Result: 4209020293269899240000000000000113
- Visual FoxPro logic used:

Lparameters pcDataToEncode, pnReturnType

&&

&& Copyright é IDautomation.com, Inc. 2001. All rights reserved.

&& For more info visithttp://www.IDautomation.com

&&

&& You may use our source code in your applications only if you are

&& using barcode fonts created by IDautomation.com, Inc.

&& and you do not remove the copyright notices in the source code.

&&

&& The purpose of this code is to calculate the Code 128 barcode from character set C

&&

&& You MUST use the fully functional Code 128 (dated 12/2000 or later)

&& font for this code to create and print a proper barcode

&&

* constant definitions for functions

#Define NUMCHARS "0123456789"

#Define ALPHACHARS "ABCDEFGHIJKLMNOPQRSTUVWXWZ"

&& following is encoding table for UPC* function, A and B sections

#Define UPCaNUMTOCODE_A Chr(34)+Chr(35)+Chr(36)+Chr(37)+Chr(38)+Chr(44)+Chr(46)+Chr(47)+Chr(58)+Chr(59)

#Define UPCaNUMTOCODE_B Chr(122)+Chr(61)+Chr(63)+Chr(64)+Chr(91)+Chr(92)+Chr(93)+Chr(95)+Chr(123)+Chr(125)

&& following is an encoding table for Code39Mod43:

&& code = order number of characters and vice versa

&& This is also used to verify the correct content of the string and

&& remove all extra characters

#Define CHARSCode39Mod43 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXWZ-. $/+%"

&& Codabar characters

#Define CHARSCodabar "0123456789$+-/.:"

&& followingare code converting arrays for RM4SCC function to make correlation

&& between a character in the input string and R+C code.

#Define CHARS_RM4SCC "0123456789ABCDEFGHIJKLMNOPQRSTUVWXWZ"

#Define CODES_RM4SCC_RplusC Chr(11)+Chr(12)+Chr(13)+Chr(14)+Chr(15)+Chr(10)
+Chr(21)+Chr(22)+Chr(23)+Chr(24)+Chr(25)+Chr(20)+Chr(31)+Chr(32)
+Chr(33)+Chr(34)+Chr(35)+Chr(30)+Chr(41)+Chr(42)+Chr(43)+Chr(44)+Chr(45)+Chr(40)
+Chr(51)+Chr(52)+Chr(53)+Chr(54)+Chr(55)+Chr(50)+Chr(01)+Chr(02)+Chr(03)+Chr(04)+Chr(05)+Chr(00)

m.lcDataToPrint = ""

m.pcDataToEncode = Alltrim(m.pcDataToEncode)

&& Check to make sure data is numeric

&& Check to make sure data is numeric and remove dashes, etc.

m.pcDataToEncode = Chrtran(m.pcDataToEncode, ;

chrtran(m.pcDataToEncode, NUMCHARS, ""), "")

&& Check for an even number of digits, add 0 if not even

If Len(m.pcDataToEncode) % 2 = 1

m.pcDataToEncode = "0" + m.pcDataToEncode

Endif

&& Assign start + stop codes

m.lcStartCode = Chr(205)

m.lcStopCode = Chr(206)

&& <<<< Calculate Modulo 103 Check Digit and generate m.lcDataToPrint >>>>

&& Set m.lnweightedTotal to the Code 128 value of the start character

m.lnweightedTotal = 105

m.lnWeightValue = 1

m.lnStringLength = Len(m.pcDataToEncode)

For m.I = 1 To m.lnStringLength Step 2

&& Get the value of each number pair

m.lnCurrentValue = Val(Substr(m.pcDataToEncode, m.I, 2))

&& get the m.lcDataToPrint

m.lcDataToPrint = m.lcDataToPrint + Chr(Iif(m.lnCurrentValue = 0, 194, ;

iif(m.lnCurrentValue < 95, m.lnCurrentValue + 32, ;

m.lnCurrentValue + 100)))

&& multiply by the weighting character

m.lnCurrentValue = m.lnCurrentValue * m.lnWeightValue

&& add the values together to get the weighted total

m.lnweightedTotal = m.lnweightedTotal + m.lnCurrentValue

m.lnWeightValue = m.lnWeightValue + 1

Next m.I

&& Divide the m.lnweightedTotal by 103 and get the remainder, this is the m.lnCheckDigitValue

m.lnCheckDigitValue = m.lnweightedTotal % 103

&& Now that we have the m.lnCheckDigitValue, find the corresponding ASCII character from the table

m.lcC128_CheckDigit = Chr(Iif(m.lnCheckDigitValue = 0, 194, ;

iif(m.lnCheckDigitValue < 95, m.lnCheckDigitValue + 32, m.lnCheckDigitValue + 100)))

&& m.pnReturnType 0 returns data formatted to the barcode font

If m.pnReturnType = 0

Return m.lcStartCode + m.lcDataToPrint + m.lcC128_CheckDigit + m.lcStopCode + " "

Endif

&& m.pnReturnType 1 returns data formatted for human-readable text

If m.pnReturnType = 1

Return m.pcDataToEncode + Alltrim(S

Posted 7.9 year(s) ago

(0)
(0)
   Report Abuse
Please post the following information:
1. What is being used as your datasource (Excel, CSV, or a database)?
2. Which IDAutomation font encoder you are using?
3. Please post the full font encoder function call (including properties) from #2.

Posted 7.9 year(s) ago

(0)
(0)
   Report Abuse
image

Let me know if you have any issues with quality.

Posted 7.9 year(s) ago

(0)
(0)
   Report Abuse
Please post a big/clear image of the barcode at issue, so I may analyze it.



Posted 7.9 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook