PDF417 Special-Function Parameters

Offset Type Name Range Meaning BCD1 Range
5 BITS     Control flags  
bit 0 EBCDIC  
B'0'
B'1'
EBCDIC-to-ASCII translation:
  • Do not translate
  • Convert data from EBCDIC to ASCII
Not supported in BCD1
bit 1 Escape sequence handling  
B'0'
B'1'
Escape-sequence handling:
  • Process escape sequences
  • Ignore all escape sequences
Not supported in BCD1
bits 2 - 7   B'000000' Reserved  
6 UBIN Data symbols X'01' - X'1E' Number of data symbol characters per row Not supported in BCD1
7 UBIN Rows X'03' - X'5A'
X'FF'
Desired number of rows
Minimum necessary rows
Not supported in BCD1
8 UBIN Security X'00' - X'08' Security level Not supported in BCD1
9 - 10 UBIN Macro length X'0000' - X'7FED' Length of Macro PDF417 Control Block that follows Not supported in BCD1
11 - n UBIN Macro data Any value Data for Macro PDF417 Control Block Not supported in BCD1
Byte 5
Control flags.
These flags control how the bar code data is processed by the BCOCA receiver.
Bit 0
EBCDIC-to-ASCII translation (for bytes 11 to end).

If this flag is B'0', the data is assumed to begin in the default character encodation and no translation is done.

If this flag is B'1', the BCOCA receiver converts each byte of the bar code data (bytes n+1 to end) and each byte of the Macro PDF417 Control Block data (bytes 11 - n) from a subset of EBCDIC code page 500 into the default character encodation (GLI 0) before this data is used to build the bar code symbol. This translation covers 181 code points, which include alphanumerics and many symbols; the 75 code points that are not covered by the translation do not occur in EBCDIC and are mapped to X'7F' (127). See Figure 1 for a picture that shows the 181 EBCDIC code points that can be translated.

The EBCDIC-to-ASCII translation flag must not be used if any of the 75 code points that have no EBCDIC equivalent are needed for the bar code data or for the Macro PDF417 Control Block data.

Table 5 in the Uniform Symbology Specification – PDF417 shows the full set of GLI 0 code points; from this set, the 75 code points that have no EBCDIC equivalent are as follows: 158, 159, 169, 176—224, 226—229, 231—240, 242—245, 247, 249, 251—252, and 254.

The 75 EBCDIC code points that are not covered by the translation and are thus mapped into X'7F' are as follows:

X'04', X'06', X'08' - X'0A', X'14' - X'15', X'17',
X'1A' - X'1B', X'20' - X'24', X'28' - X'2C', X'30' - X'31',
X'33' - X'36', X'38' - X'3B', X'3E'  X'46', X'62'
X'64' - X'66', X'6A', X'70', X'72' - X'78', X'80',
X'8C' - X'8E', X'9D' X'9F', X'AC' - X'AF', X'B4' - X'B6',
X'B9', X'BC' - X'BF', X'CA', X'CF', X'DA', X'EB',
X'ED' - X'EF', X'FA' - X'FB', X'FD' - X'FF'

Figure 1. Subset of EBCDIC code page 500 that can be translated to GLI 0
ib6p3023 This is a code page picture that shows the subset of EBCDIC code page 500 that can be translated to GLI 0.
Bit 1
Escape-sequence handling (for bytes n+1 to end).

If this flag is B'0', each X'5C' (backslash) within the bar code data is treated as an escape character according to the PDF417 symbology specification.

If this flag is B'1', each X'5C' within the bar code data is treated as a normal data character and therefore all escape sequences are ignored. In this case, no GLI code page switching and no reader programming can occur within the data.
Note: If the EBCDIC-to-ASCII translation flag is also set to B'1', all EBCDIC backslash characters (X'E0') are first converted into X'5C' before the escape-sequence handling flag is applied.
Bits 2 - 7
Reserved.
Byte 6
Data symbol characters per row.

This parameter specifies the number of data symbol characters per row. Each row consists of a start pattern, a left row indicator codeword, 1 - 30 data symbol characters, a right row indicator codeword (omitted in a truncated symbol), and a stop pattern. The aspect ratio of the bar code symbol is determined by the number of data symbol characters and the number of rows.

Exception condition EC-0F06 exists if an invalid number of data symbol characters per row is specified.

Because of the Error Checking and Correction (ECC) algorithm and the data compaction method that is used by the printer when the symbol is built, the number of data symbol characters is not necessarily the same as the number of characters in the bar code data.

Byte 7
Desired number of rows.

This parameter specifies the desired number of rows in the bar code symbol. From 3 - 90 rows can be specified or X'FF' can be specified to instruct the printer to generate the minimum number of rows necessary. The number of rows times the number of data symbol characters per row cannot exceed 928. Exception condition EC-0F07 exists if an invalid number of rows is specified.

The actual number of rows that are generated depends on the amount of data to be encoded and on the security level selected. If more rows than necessary are specified, the symbol is padded to fill the requested number of rows. If not enough rows are specified, enough extra rows are inserted by the printer to produce the symbol.

If too much data is specified to fit in the bar code symbol, exception condition EC-0F08 exists.

Byte 8
Security level.
This parameter specifies the desired security level for the symbol as a value 0 - 8. Each higher security level causes more error correction codewords to be added to the symbol. At a particular security level, a number of codewords can be missing or erased and the symbol can still be recovered. Also, PDF417 can recover from mis-decodes of codewords. The formula is: Maximum Limit >= Erasures + 2*Misdecodes. The relation of security level to error correction capability is as follows:
Security level Maximum Limit >= Erasures + 2*Misdecodes
0 0
1 2
2 6
3 14
4 30
5 62
6 126
7 254
8 510
For example, at security level 6, a total of 126 codewords can be either missing or destroyed and the entire symbol can still be completely recovered. The following table provides a recommended security level for various amounts of data:
Table 1. Caption. Description
Number of Data Codewords Recommended Security Level
1 - 40 2
41 - 160 3
161 - 320 4
321 - 863 5

Exception condition EC-0F09 exists if an invalid security level value is specified.

Bytes 9 - 10
Length of Macro PDF417 Control Block that follows.

This field specifies the length of a Macro PDF417 Control Block that follows in bytes 11 - n; this length does not contain the length field itself.

If X'0000' is specified, no Macro PDF417 Control Block is specified as a special function and this is the last field of the special-function parameters; what follows is the bar code data itself.

If a value between X'0001' and X'7FED' is specified, the BCOCA receiver builds a Macro PDF417 Control Block at the end of the bar code symbol by using the data in bytes 11 - n.

If an invalid length value is specified, exception condition EC-0F0C exists.

Bytes 11 - n
Macro PDF417 Control Block data.

The special codewords \922, \923, and \928 are used for coding a Macro PDF417 Control Block as defined in section G.2 of the Uniform Symbology Specification PDF417, but these codewords must not be used within the bar code data. Exception condition EC-2100 exists if one of these escape sequences is found in the bar code data. If a Macro PDF417 Control Block is needed, it is specified in bytes 11 - n.

The data for this Macro PDF417 Control Block must adhere to the following format; exception condition EC-0F0D exists if this format is not followed:
  • For the symbol in a Macro PDF417 that represents the last segment of the Macro PDF417, the data must contain \922. For all symbols in a Macro PDF417, except the one representing the last segment:
    • A Macro PDF417 Control Block starts with a \928 escape sequence.
    • Followed by 1 to 5 numeric digits (bytes values X'30' - X'39'), representing a segment index value 1 - 99,999.
    • Followed by a variable number of escape sequences that contain values \000 - \899, representing the file ID.
    • Followed by zero or more optional fields, with the following layout:
      • \923 escape sequence, signaling an optional field
      • Escape sequence that contains the field designator with a value \000 - \006
      • Followed by a variable number of text characters (for field designators \000, \003, and \004) or a variable number of numeric digits (for field designators \001, \002, \005, and \006). The field designators are defined in Table G1 of the Uniform Symbology Specification. For text characters, the byte values must be X'09', X'0A', X'0D', or from X'20' through X'7E'. These values represent the uppercase letters A - Z, the lowercase letters a - z, and the digits 0- 9, plus some punctuation and special characters (for GLI 0). For the numeric digits, the byte values must be X'30' - X'39'.
        • For field designator \001, the 1 - 5 numeric digits that follow represent the segment count. This value must be greater than or equal to the segment index value.
        • For field designator \002, the 1 - 11 numeric digits that follow represent the time stamp on the source file that is expressed as the elapsed time in seconds since January 1, 1970 00:00 GMT.
        • For field designator \005, one or more numeric digits must follow.
        • For field designator \006, the 1 - 5 numeric digits that follow represent the decimal value of the 16-bit CRC checksum over the entire source file. This checksum value must be a decimal value from 0 through 65,535.
The file name, segment count, time stamp, sender, addressee, file size, and checksum are provided in the optional fields of the Macro PDF417 Control Block and the BCOCA receiver makes no attempt to calculate or verify these values (other than the previously stated restrictions). If the Macro PDF417 Control Block data does not follow these rules, exception condition EC-0F0D exists. The Uniform Symbology Specification PDF417 has the following additional claims. The BCOCA receiver does not check for these claims nor does it report any exceptions conditions if these claims are violated:
  • If the optional Segment Count is given in the Macro PDF417 Control Block of one of the segments (symbols) of the macro, then it must be used in all of the segments (symbols) of the macro.
  • All optional fields, other than the Segment Count, need to appear only in one of the segments (symbols) of the macro.
  • If an optional field with the same field designator appears in more than one segment (symbol) of the same macro, then it must appear identically in every segment (symbol).