Skip to main content

This article provides information and COBOL code to create USPS Intelligent Mail barcodes.

Problem:

The Intelligent Mail barcode, formerly referred to as the 4-State Customer barcode, is a new Postal Service barcode used to sort and track letters and flats. The Postal Service is promoting use of the Intelligent Mail barcode because it expands the ability to track individual mailpieces and provides customers with greater visibility into the mailstream. However, the creation of the barcode 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.

Resolution:

RM/COBOL provides logical bit manipulation capabilities in its subprogram library. The attached RM/COBOL program makes use of these capabilities to implement the algorithm set forth in USPS-B-3200, without use of the DLL and shared object libraries made available by the USPS. 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 barcode fonts made available by the USPS.

The test program also demonstrates the use of an XSL style sheet used by XML Extensions to produce an SVG graphics document rendering the barcode for XML/SVG capable rendering engines. Use a recent Firefox or Internet Explorer browser to view or print the barcode. Another XML-based rendering solution for producing PDF is XSL Formatting Objects, supplied by vendors such as RenderX or available in open source as Apache FOP.

This all COBOL implementation may not be appropriate for high-volume mailers. Better performance might be obtained through use of CodeBridge to call the USPS supplied DLL/shared objects.

Note: This implementation has been tested only to ascertain conformance with the examples provided in USPS-B-3200. Additional testing should be performed before using this solution in the ‘real world.’

Incident Number: 2285183

Old KB# 14464

This article provides information and COBOL code to create USPS Intelligent Mail barcodes.

Problem:

The Intelligent Mail barcode, formerly referred to as the 4-State Customer barcode, is a new Postal Service barcode used to sort and track letters and flats. The Postal Service is promoting use of the Intelligent Mail barcode because it expands the ability to track individual mailpieces and provides customers with greater visibility into the mailstream. However, the creation of the barcode 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.

Resolution:

RM/COBOL provides logical bit manipulation capabilities in its subprogram library. The attached RM/COBOL program makes use of these capabilities to implement the algorithm set forth in USPS-B-3200, without use of the DLL and shared object libraries made available by the USPS. 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 barcode fonts made available by the USPS.

The test program also demonstrates the use of an XSL style sheet used by XML Extensions to produce an SVG graphics document rendering the barcode for XML/SVG capable rendering engines. Use a recent Firefox or Internet Explorer browser to view or print the barcode. Another XML-based rendering solution for producing PDF is XSL Formatting Objects, supplied by vendors such as RenderX or available in open source as Apache FOP.

This all COBOL implementation may not be appropriate for high-volume mailers. Better performance might be obtained through use of CodeBridge to call the USPS supplied DLL/shared objects.

Note: This implementation has been tested only to ascertain conformance with the examples provided in USPS-B-3200. Additional testing should be performed before using this solution in the ‘real world.’

Incident Number: 2285183

Old KB# 14464

USPS offering all the services under liteblue. Login to liteblue from https://liteblueuspslogin.com/


This article provides information and COBOL code to create USPS Intelligent Mail barcodes.

Problem:

The Intelligent Mail barcode, formerly referred to as the 4-State Customer barcode, is a new Postal Service barcode used to sort and track letters and flats. The Postal Service is promoting use of the Intelligent Mail barcode because it expands the ability to track individual mailpieces and provides customers with greater visibility into the mailstream. However, the creation of the barcode 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.

Resolution:

RM/COBOL provides logical bit manipulation capabilities in its subprogram library. The attached RM/COBOL program makes use of these capabilities to implement the algorithm set forth in USPS-B-3200, without use of the DLL and shared object libraries made available by the USPS. 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 barcode fonts made available by the USPS.

The test program also demonstrates the use of an XSL style sheet used by XML Extensions to produce an SVG graphics document rendering the barcode for XML/SVG capable rendering engines. Use a recent Firefox or Internet Explorer browser to view or print the barcode. Another XML-based rendering solution for producing PDF is XSL Formatting Objects, supplied by vendors such as RenderX or available in open source as Apache FOP.

This all COBOL implementation may not be appropriate for high-volume mailers. Better performance might be obtained through use of CodeBridge to call the USPS supplied DLL/shared objects.

Note: This implementation has been tested only to ascertain conformance with the examples provided in USPS-B-3200. Additional testing should be performed before using this solution in the ‘real world.’

Incident Number: 2285183

Old KB# 14464

Access all USPS services through the LiteBlue platform by logging in usps liteblue