Troubleshooting
Problem
This document provides information on support for UCC and EAN128 bar codes within IBM OS/400 or IBM i5/OS and IBM Print Services Facility/400 (PSF/400).
Resolving The Problem
This document provides information on support for UCC and EAN128 bar codes within IBM OS/400 or IBM i5/OS and IBM Print Services Facility/400 (PSF/400).
This document was last updated on 17 July 2012.
Several times over the past few years questions from the field have come in asking if IPDS printers support the UCC/EAN 128-bar code. The answer to this has been tricky; in theory, Bar Code Content Object Architecture (BCOCA) and IBM Print Services Facility (PSF/400) support UCC/EAN 128, but many of the IPDS printers do not completely support it. So, the most accurate answer has been "no, UCC/EAN 128 is not fully supported in all AFP environments." Support for UCC/EAN 128 has been requested several times, and most users have had to use a font solution rather than BCOCA.
The problem is that UCC/EAN 128 is a subset of the Code 128 bar code that the IPDS printers support, and Code 128 Industry Standard specification provided an algorithm that the printer can use to generate the smallest symbol possible; some IPDS printers use this algorithm correctly according to the 1986 Specification. Unfortunately, long after the implementation was completed and shipped in many printers, the industry standard group modified the algorithm in the Code 128 Symbology Specification and the printer microcode has not been changed to match the newer (1993) specification. The change is to allow an FNC1 character after a Start Code C as required by UCC/EAN 128. The old algorithm required the printer to use a Start Code B when an FNC1 was encountered as the first character.
The BCOCA architecture does not specify which version of the algorithm to use. The IPDS development team has not yet changed to the newer algorithm that fully supports UCC/EAN 128 because of the possibility of negatively affecting existing applications. Therefore, the IPDS microcode needs a means of detecting that a bar code is intended to follow the UCC/EAN 128 algorithm versus following the older Code 128 algorithm.
Therefore, the BCOCA architecture has been updated to allow a X'03' modifier byte for the Code 128 bar code type. If modifier X'03' is specified and the bar code data starts with an FNC1 character and is followed by valid UCC/EAN Application Identifier (AI) and data, the bar code will be generated using the Start Code C. If the FNC1 character is not found or is not followed by a valid AI and data, the old method of generating a Code 128 bar code will be used. That is, the data will be encoded in the manner that results in the smallest readable bar code using a Start Code A, B, or C.
The DDS Reference manual has not added the X'03' modifier byte to the list of valid modifiers for Code 128. However, OS/400 and i5/OS will allow it to be specified in the DDS. Here is a sample record that specifies UCC/EAN 128:
R RECORD1
FIELD1 10 3 3BARCODE(CODE128 2 X'03')
This is a 10-character field. The application must ensure that the first character placed in the field is an FNC1 character (X'8F'). This must be followed by a valid AI character and the remainder of the data. CODE128 is required, and the X'03' indicates that UCC/EAC 128 should be used. The number 2 in between specifies the number of lines tall the bar code should print; at 6 Lines per Inch, this is a 0.3-inch tall bar code.
In addition, the IPDS printer must support this new modifier. If it does not, the spooled file does not print, and an error message will be logged to the printer writer joblog stating that a bar code specification check was encountered. IBM printers that currently have this support are the IBM Infoprint 2000, 4000, and 4100 printers; although, it is expected that other printers might follow suit in the future. Prior to R540, the AFPDS-to-ASCII Transform code within the Host Print Transform (HPT) function of OS/400 or i5/OS did not have support to recognize this new modifier. Therefore, the bar code might not be represented correctly. As with any type of printer, verify that the printer hardware supports the UCC/EAN 128 bar code and that the resulting bar code can be read by your bar code reader before putting this into production.
For More Information
For more information, please refer to the System i Programming DDS for Printer Files publication:
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]
Historical Number
29485546
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1016673