Click here to Skip to main content
11,636,889 members (73,370 online)
Click here to Skip to main content

USPS OneCode Barcodes

, 3 Oct 2008 Apache 94.4K 2.6K 51
Rate this:
Please Sign up or sign in to vote.
USPS One Code - Intelligent Mail Barcode (4-State Customer Barcode) - implementation with VB 2008

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

Share

About the Author


You may also be interested in...

Comments and Discussions

 
Questionthanks ! you can also try this Pin
jacaboo1-Aug-13 16:07
memberjacaboo1-Aug-13 16:07 
QuestionAdded the fixes mentioned in the comments to C# code Pin
Deepfreezed31-Jul-13 4:55
memberDeepfreezed31-Jul-13 4:55 
Questionbarcoding Pin
Barcoding House22-Jan-13 16:11
memberBarcoding House22-Jan-13 16:11 
Questiontransportation barcode Pin
steve7g15-Feb-12 22:32
membersteve7g15-Feb-12 22:32 
AnswerRe: transportation barcode Pin
sybil_9-Oct-12 16:53
membersybil_9-Oct-12 16:53 
Question.NET Barcode for ASP.NET Pin
steve7g15-Feb-12 22:16
membersteve7g15-Feb-12 22:16 
QuestionOneCode Barcode Generator for .NET Pin
KeepDynamic9-Jan-12 4:07
memberKeepDynamic9-Jan-12 4:07 
GeneralMy vote of 4 Pin
ncik92-Aug-11 0:52
memberncik92-Aug-11 0:52 
GeneralDecoder in plan C Pin
Member 420048219-Sep-10 15:22
memberMember 420048219-Sep-10 15:22 
AnswerRe: Decoder in plan C Pin
drdigit19-Sep-10 21:57
memberdrdigit19-Sep-10 21:57 
GeneralBarcode Pin
Jones xxx26-May-09 13:19
memberJones xxx26-May-09 13:19 
Generalhelp pls.... Pin
lakshmi priya.t.n29-Jan-09 17:41
memberlakshmi priya.t.n29-Jan-09 17:41 
AnswerRe: help pls.... Pin
drdigit31-Jan-09 11:47
memberdrdigit31-Jan-09 11:47 
GeneralCompilation error Pin
robertjb207-Jan-09 9:45
memberrobertjb207-Jan-09 9:45 
AnswerRe: Compilation error Pin
drdigit8-Jan-09 5:14
memberdrdigit8-Jan-09 5:14 
GeneralHere is another Implementation for .Net (C#) using USPS provided dll and fonts Pin
Member 422991713-Nov-08 8:43
memberMember 422991713-Nov-08 8:43 
QuestionSample application Pin
amarbank23-Nov-10 6:38
memberamarbank23-Nov-10 6:38 
GeneralRe: Here is another Implementation for .Net (C#) using USPS provided dll and fonts Pin
crobbins6-Jan-11 8:56
membercrobbins6-Jan-11 8:56 
GeneralRe: Here is another Implementation for .Net (C#) using USPS provided dll and fonts Pin
Sid Torres15-Jun-11 8:12
memberSid Torres15-Jun-11 8:12 
QuestionRe: Here is another Implementation for .Net (C#) using USPS provided dll and fonts Pin
bendece25-Feb-11 16:09
memberbendece25-Feb-11 16:09 
QuestionIncorrect Decode Example Pin
voxdisc10-Nov-08 16:35
membervoxdisc10-Nov-08 16:35 
AnswerRe: Incorrect Decode Example Pin
bheiland22-May-09 2:15
memberbheiland22-May-09 2:15 
GeneralRe: Incorrect Decode Example Pin
Gylfi Ingvason27-May-09 8:59
memberGylfi Ingvason27-May-09 8:59 
GeneralRe: Incorrect Decode Example Pin
bheiland27-May-09 13:59
memberbheiland27-May-09 13:59 
AnswerRe: Incorrect Decode Example Pin
bheiland27-May-09 14:04
memberbheiland27-May-09 14:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150728.1 | Last Updated 3 Oct 2008
Article Copyright 2007 by the retired
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid