XML Extensions - United States Postal Service Bar Codes

The Intelligent Mail bar code, formerly known as the 4-State Customer bar code, is a United States Postal Service bar code used to sort and track letters and flats. The Postal Service promotes using the Intelligent Mail bar code because it expands individual mail piece tracking and provides customers with greater visibility into the mail stream. However, creating the bar code is complex and uses bit manipulations not familiar in COBOL. USPS provides a subprogram for several platforms, but an ‘all COBOL’ solution is more portable. extend provides logical bit manipulation capabilities in its subprogram library. The example contained in xmlext\USPSBarcodes uses these capabilities to implement the algorithm set forth in USPS-B-3200, without using the USPS provided DLL and shared object.

A test program is also enclosed that demonstrates results identical to the main examples found in USPS- B-3200. The resulting character string may be used directly with USPS provided bar code fonts. The test program also demonstrates the use of an XSL stylesheet to produce an SVG graphics document rendering the bar code for XML/SVG capable rendering engines. Finally, the test program confirms that all successful test cases found in the USPS encoder reference set produce identical character strings.
Note: This all-COBOL implementation may not be appropriate for high-volume mailers. Better performance might be obtained by using the USPS supplied DLL/shared objects. This implementation was tested only to ascertain conformance with the examples provided in USPS-B-3200 and the reference set found in the file uspsIMbEncoderTestCases.xml, which can be downloaded from the link uspsReferenceSetEncoder1.0.0.zip located at https://ribbs.usps.gov/onecodesolution/download.cfm.