Bar Code Data

The data is specified as a series of single-byte code points from a specific code page. Some symbologies limit the valid code points to just the 10 numerals (0 - 9), other symbologies allow a richer set of code points. The bar code symbol is produced from these code points; the code points are also used, along with a particular type style, when HRI is produced.

Table 1 lists, for each symbology, the valid code page from which characters are chosen and the type style that is used when HRI is printed in terms of a registered CPGID and FGID. More information about these values can be found in IBM® AFP Fonts: Font Summary and in IBM AFP Fonts: Technical Reference for Code Pages.

Table 1. Valid Code Pages and Type Styles
Type Bar Code Symbology EBCDIC-Based CPGID FGID
1 Code 39 (3-of-9 Code), AIM USS-39 500 Device specific
2 MSI (modified Plessey code) 500 Device specific
3 UPC/CGPC — Version A 893 3 (OCR-B)
5 UPC/CGPC — Version E 893 3 (OCR-B)
6 UPC — Two-digit Supplemental (Periodicals) 893 3 (OCR-B)
7 UPC — Five-digit Supplemental (Paperbacks) 893 3 (OCR-B)
8 EAN-8 (includes JAN-short) 893 3 (OCR-B)
9 EAN-13 (includes JAN-standard) 893 3 (OCR-B)
10 Industrial 2-of-5 500 Device specific
11 Matrix 2-of-5 500 Device specific
12 Interleaved 2-of-5, AIM USS-I 2/5 500 Device specific
13 Codabar, 2-of-7, AIM USS-Codabar 500 Device specific
17 Code 128, AIM USS-128 1303 Device specific
22 EAN Two-digit Supplemental 893 3 (OCR-B)
23 EAN Five-digit Supplemental 893 3 (OCR-B)
24 POSTNET 500 None
26 RM4SCC 500 None
27 Japan Postal Bar Code 500 None
28 Data Matrix (2D bar code) Code page is selectable within the symbol by using ECI protocol None
29 MaxiCode (2D bar code) Code page is selectable within the symbol by using ECI protocol None
30 PDF417 (2D bar code) Code page is selectable within the symbol by using ECI protocol None
31 Australia Post Bar Code Code page is selectable within the symbol by using ECI protocol Device Specific
32 QR Code Code page is selectable within the symbol by using ECI protocol None
33 Code 93 500 Device Specific
34 USPS Four-State 500 Device Specific

As shown in Table 1, the font that is used to print HRI depends on the symbology. Some symbologies use OCR-B; others use a device-specific font (typically OCR-A).

Table 2 lists the valid characters for each symbology and specifies how many characters are allowed for a bar code symbol.

Table 2. Valid Characters and Data Lengths
Code Bar Code Type Valid Characters Valid Data Length
1 Code 39 (3-of-9 Code), AIM USS-39 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ
-.$/+% and the space character

A total of 43 valid input characters.

Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

2 MSI (modified Plessey code) 0123456789 3 - 15 characters for Modifier X'01'

2 - 14 characters for Modifier X'02'

1 - 13 characters for all other modifiers

3 UPC/CGPC - Version A 0123456789 11 characters
5 UPC/CGPC - Version E 0123456789 10 characters
6 UPC - Two-digit Supplemental (Periodicals) 0123456789 2 characters for Modifier X'00'

13 characters for Modifier X'01'

12 characters for Modifier X'02'

7 UPC - Five-digit Supplemental (Paperbacks) 0123456789 5 characters for Modifier X'00'

16 characters for Modifier X'01'

15 characters for Modifier X'02'

8 EAN-8 (includes JAN-short) 0123456789 7 characters
9 EAN-13 (includes JAN-standard) 0123456789 12 characters
10 Industrial 2-of-5 0123456789 Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

11 Matrix 2-of-5 0123456789 Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

12 Interleaved 2-of-5, AIM USS-I 2/5 0123456789 Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

13 Codabar, 2-of-7, AIM USS-Codabar 0123456789
-$:/.+ABCD

16 characters plus 4 start/stop characters (ABCD) (Note 2)

Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

17 Code 128, AIM USS-128 (modifier X'02') All characters that are defined in the Code 128 code page Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

UCC/EAN 128 (modifiers X'03' and X'04') 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ abcdefghijklm nopqrstuvwxyz
FNC1
Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

22 EAN Two-digit Supplemental 0123456789 2 characters for Modifier X'00'

14 characters for Modifier X'01'

23 EAN Five-digit Supplemental 0123456789 5 characters for Modifier X'00'

17 characters for Modifier X'01'

24 POSTNET 0123456789 5 characters for Modifier X'00'

9 characters for Modifier X'01'

11 characters for Modifier X'02'

11 characters for Modifier X'04'

BCOCA range for Modifier X'03': 0 - 50 characters (see note 1)

26

Royal Mail
(RM4SCC,
modifier X'00')

0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

Royal Mail (Dutch KIX variation, modifier X'01') 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ abcdefghijklm nopqrstuvwxyz Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

27 Japan Postal Bar Code (Modifier X'00') 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ
- (hyphen)
Symbology: 7 or more

BCOCA range: 7 - 50 characters (see note 1)

Japan Postal Bar Code (Modifier X'01') 0123456789 CC1,CC2,CC3,CC4, CC5,CC6,CC7,CC8
- (hyphen)
start, stop
No length checking done; refer to the modifier X'01' description.
28 Data Matrix Any 1-byte character or binary data Symbology: up to 3116 depending on whether the data is character or numeric; refer to the symbology specification.

BCOCA range: 0 - 3116 characters (see note 1)

29 MaxiCode Any 1-byte character that is allowed by the symbol mode Symbology: up to 93 alphanumeric characters per symbol depending on encoding overhead or up to 138 numeric characters per symbol; refer to the symbology specification.

BCOCA range: 0 - 138 characters

30 PDF417 Any 1-byte character or binary data Symbology: up to 1850 text characters, 2710 ASCII numeric digits, or 1108 bytes of binary data per symbol depending on the security level; refer to the symbology specification.

BCOCA range: 0 - 2710 characters

31
Australia Post Bar Code –
Refer to the modifier (byte 13) description to see which characters are valid in specific parts of the symbol.
Modifier X'01' – Standard Customer Barcode 0123456789 Symbology: 8 digits

BCOCA range: 8 digits

Modifier X'02' – Customer Barcode 2 using Table N 0123456789 Symbology: 8 - 16 digits

BCOCA range: 8 - 16 digits

Modifier X'03' – Customer Barcode 2 using Table C 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ abcdefghijklm nopqrstuvwxyz
(space)
# (number sign)
Symbology: 8 - 13 characters

BCOCA range: 8 - 13 characters

Modifier X'04' – Customer Barcode 2 using proprietary encoding 0123456789 for sorting code
0 - 3 for customer information
Symbology: 8 - 24 digits

BCOCA range: 8 - 24 digits

Modifier X'05' – Customer Barcode 3 using Table N 0123456789 Symbology: 8 - 23 digits

BCOCA range: 8 - 23 digits

Modifier X'06' – Customer Barcode 3 using Table C 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ abcdefghijklm nopqrstuvwxyz
(space)
# (number sign)
Symbology: 8 - 18 characters

BCOCA range: 8 - 18 characters

Modifier X'07' – Customer Barcode 3 using proprietary encoding 0123456789 for sorting code
0 - 3 for customer information
Symbology: 8 - 39 digits

BCOCA range: 8 - 39 digits

Modifier X'08' – Reply Paid Barcode 0123456789 Symbology: 8 digits

BCOCA range: 8 digits

32 QR Code Any 1-byte character or binary data Symbology: Up to 7,089 characters depending on the size and type of the data; refer to the symbology specification.

BCOCA range: 0 - 7,089 characters

33 Code 93 0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ
-.$/+%
space character
a - representing Shift 1
b - representing Shift 2
c - representing Shift 3
d - representing Shift 4

A total of 47 valid input characters.

Symbology: unlimited

BCOCA range: 0 - 50 characters (see note 1)

34 USPS Four-State 0123456789 20 digits for Modifier X'00'
25 digits for Modifier X'01'
29 digits for Modifier X'02'
31 digits for Modifier X'03'
Notes:
  1. All BCOCA receivers must support at least the BCOCA range. Some receivers support a larger data length.
  2. Some descriptions of Codabar show the characters T, N, *, E as stop characters (representing the stop characters A, B, C, D), but the Codabar symbology allows only A, B, C, D as start and stop characters. This alternative representation (T, N, *, E) is used only to distinguish between the start and stop characters when a Codabar symbol is described; when a BCOCA Codabar symbol is coded, start and stop characters must be represented with A, B, C, or D.
  3. The data for the UPC and EAN symbologies is numeric and of a fixed length, but not all numbers of the appropriate length are valid. This is because the coding scheme is designed to uniquely identify both a product and its manufacturer. The first part of the symbol represents the manufacturer and is defined in the symbology specification (not all numbers are valid in this part of the symbol). The second part of the symbol represents a unique product identifier code that is assigned by the manufacturer. See the appropriate symbology specification for more details.
Table 3. Characters and Code Points used in the BCOCA Symbologies; Excluding Code 128
Character EBCDIC Code Point
0 X'F0'
1 X'F1'
2 X'F2'
3 X'F3'
4 X'F4'
5 X'F5'
6 X'F6'
7 X'F7'
8 X'F8'
9 X'F9'
A X'C1'
B X'C2'
C X'C3'
D X'C4'
E X'C5'
F X'C6'
G X'C7'
H X'C8'
I X'C9'
J X'D1'
K X'D2'
L X'D3'
M X'D4'
N X'D5'
O X'D6'
P X'D7'
Q X'D8'
R X'D9'
S X'E2'
T X'E3'
U X'E4'
V X'E5'
W X'E6'
X X'E7'
Y X'E8'
Z X'E9'
a X'81'
b X'82'
c X'83'
d X'84'
e X'85'
f X'86'
g X'87'
h X'88'
i X'89'
j X'91'
k X'92'
l X'93'
m X'94'
n X'95'
o X'96'
p X'97'
q X'98'
r X'99'
s X'A2'
t X'A3'
u X'A4'
v X'A5'
w X'A6'
x X'A7'
y X'A8'
z X'A9'
- (hyphen) X'60'
# (number sign) X'7B'
. (period) X'4B'
$ X'5B'
X'61'
+ X'4E'
% X'6C'
: X'7A'
Space X'40'
FNC1 X'8F'

The Code 128 code page (CPGID = 1303) is defined as shown in Figure 1.

Figure 1. Code 128 Code Page (CPGID = 1303)
This picture shows the code point assignments for the Code 128 code page (CPGID = 1303).
Note: All START, STOP, SHIFT, and CODE characters are generated by the printer to produce the shortest bar code possible from the specified data; these characters are not specified in the Bar Code Symbol Data. All code points not listed in the table are undefined. The code points that do not have graphic character shapes, such as X'00' (NUL) and X'8F' (FN1), are control codes that are defined within the Code 128 symbology; in the HRI, control codes print in a device-dependent manner. The FN1, FN2, FN3, and FN4 characters are also called FNC1, FNC2, FNC3, and FNC4 in the Code 128 Symbology Specification.