5,696,576 members and growing! (14,527 online)
Email Password   helpLost your password?
Languages » VB.NET » General     Advanced License: The Apache License, Version 2.0

USPS OneCode Barcodes

By drdigit

USPS One Code - Intelligent Mail Barcode (4-State Customer Barcode) - implementation with VB 2008
VB 9.0, VB, Windows, .NET, Visual Studio, Dev

Posted: 20 Sep 2007
Updated: 3 Oct 2008
Views: 23,885
Bookmarked: 30 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
15 votes for this Article.
Popularity: 4.88 Rating: 4.15 out of 5
1 vote, 6.7%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
1 vote, 6.7%
4
13 votes, 86.7%
5

Introduction

This is not a typical article. The focus is on Intelligent Mail Barcode (4 State Customer Barcode) or USPS OneCode implementation as a direct solution for anyone who needs it. The downloads include one VB.NET and one C# class – VS2008 with .NET 3.5 syntax - that generate the string expression of OneCode barcodes and decode a barcode string. The code (uncommented) is a modified fraction of the Pathenon project (covers all known 1D and 2D barcodes) that you will read here on The Code Project in the near future, hopefully. I've noticed that there is no related article, so there you are with an ASAP solution for this new USPS symbology.

Basic Information

Intelligent Mail Barcode, also known as the USPS OneCode Solution or USPS 4-State Customer Barcode (abbreviated 4CB, 4-CB, or USPS4CB), is the latest barcode symbology of the United States Postal Services. It combines routing ZIP code information and tracking information into a single 4-state code. It effectively encodes data from POSTNET and PLANET barcodes into a single barcode while providing a greater range of tracking data.

A 4-state barcode is based on a tracker with ascenders and descenders. The four possible states are tracker (neither ascender nor descender), full (both ascender and descender), ascender only, and descender only. The Intelligent Mail barcode consists of 65 bars as a result of encoding data fields of the following types:

Tracking Code

  • Barcode Identifier as 2 digits (2nd digit must be 0–4)
  • Service Type Identifier as 3 digits
  • Mailer Identifier as 6 or 9 digits and
  • Serial Number as 9 (when used with 6 digit Mailer ID) or 6 (when used with 9 digit Mailer ID) digits

Routing Code

  • Delivery Point ZIP Code as 0, 5, 9, or 11 digits

The above fields, with a maximum of 31 digits in length, are encoded via a complex process (involving big integers and transposed lookups) to bars expressed as a string with 65 characters in the range of A, D, T, F. More information and specifications can be found here.

Conclusion

Note once again that this is not a typical article, but a direct solution for people dealing with this complex barcode symbology.

Thanks for your time.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0

About the Author

drdigit


Passionate "hands on" solution oriented developer, coding since 1983 with proficiency in VB (from v1 to .NET 2008), C#, MS SQL (from v6.0a to 2008), mySQL (from v4 to v6), XML/XSL/XSD, (D)HTML, JavaScript, ... and fluency in PHP, working as a freelancer in Greece and Ireland.
Location: Greece Greece

Other popular VB.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 12 of 12 (Total in Forum: 12) (Refresh)FirstPrevNext
GeneralHere is another Implementation for .Net (C#) using USPS provided dll and fontsmemberMember 42299179:43 13 Nov '08  
QuestionIncorrect Decode Examplemembervoxdisc17:35 10 Nov '08  
GeneralThank you for sharing your work...memberaccusteve9:08 4 Nov '08  
GeneralFailed Test CasesmemberMember 45282925:56 22 Sep '08  
AnswerRe: Failed Test Casesmemberdrdigit2:39 24 Sep '08  
QuestionPHP Version? :Dmembervoxdisc22:30 19 Aug '08  
GeneralGREAT!memberhpellegrino11:07 15 Aug '08  
GeneralCooool!membertharpa8:48 31 Oct '07  
QuestionOneCode string Decoder?memberres47:16 16 Oct '07  
AnswerRe: OneCode string Decoder?memberdrdigit23:53 16 Oct '07  
GeneralRe: OneCode string Decoder?membertharpa9:00 14 Mar '08  
NewsOneCode Decoder is finally herememberdrdigit15:36 16 Aug '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 3 Oct 2008
Editor: Sean Ewington
Copyright 2007 by drdigit
Everything else Copyright © CodeProject, 1999-2008
Web12 | Advertise on the Code Project