QR Code 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 CODE EBCDIC code page  
X'00'
X'01'
X'02'
X'03'
EBCDIC code page that is used to encode data:
  • No code page specified
  • Code page 500 (International #5)
  • Code page 290 (Japanese Katakana Ext.)
  • Code page 1027 (Japanese Latin Extended)
Not supported in BCD1
7 CODE Version  
X'00'
X'01' - X'28'
Version of symbol:
  • Smallest symbol
  • Version number (1 - 40)
Not supported in BCD1
8 CODE Error correction level  
X'00'
X'01'
X'02'
X'03'
Level of error correction:
  • Level L (7% recovery)
  • Level M (15% recovery)
  • Level Q (25% recovery)
  • Level H (30% recovery)
Not supported in BCD1
9 UBIN Sequence indicator X'00' - X'10' Structured append sequence indicator Not supported in BCD1
10 UBIN Total symbols X'00' or X'02' - X'10' Total number of structured-append symbols Not supported in BCD1
11 UBIN Parity Data X'00' - X'FF' Structured append parity data X'00' - X'FF'
12 BITS     Special-function flags  
bit 0 UCC/EAN FNC1  
B'0'
B'1'
Alternate data type identifier:
  • User-defined symbol
  • Symbol conforms to UCC/EAN standards
Not supported in BCD1
bit 1 Industry FNC1  
B'0'
B'1'
Alternate data type identifier:
  • User-defined symbol
  • Symbol conforms to industry standards
Not supported in BCD1
bits 2 - 7   B'000000' Reserved  
13 CODE Application indicator See field description Application indicator for Industry FNC1 Not supported in BCD1
A desired symbol size is specified by the version parameter (byte 7), but the actual size of the symbol depends on the amount of data to be encoded. If not enough data is supplied, the symbol is padded with null data to reach the requested symbol size. If too much data is supplied for the requested symbol size, the symbol is bigger than requested and is the smallest symbol that can accommodate that amount of data.
Byte 5
Control flags.
These flags control how the bar code data (bytes n+1 to end) is processed by the BCOCA receiver; the receiver can be an IPDS printer or any other product that processes BCOCA objects.
Bit 0
EBCDIC-to-ASCII translation.

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

If this flag is B'1' and an EBCDIC code page is selected in byte 6, the BCOCA receiver converts each byte of the bar code data from the EBCDIC code page that is specified in byte 6 into ASCII code page 897 before this data is used to build the bar code symbol. The following EBCDIC code pages can be used to encode the bar code data:
  • Code page 500 (International #5) — specify X'01' in byte 6.

    Only 128 of the characters within ECI 000020 can be specified in code page 500. The code page 500 characters that can be translated are shown in

  • Code page 290 (Japanese Katakana Extended) — specify X'02' in byte 6.
  • Code page 1027 (Japanese Latin Extended) — specify X'03' in byte 6.

EBCDIC characters that are not defined within ECI 000020 are mapped to X'7F' (DEL).

Bit 1
Escape-sequence handling.

If this flag is B'0', each X'5C' within the bar code data is treated as an escape character according to the QR Code 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 ECI code page switching can occur within the data.
Note: If the EBCDIC-to-ASCII translation flag is also set to B'1', all EBCDIC characters are first converted into X'5C' before the escape-sequence handling flag is applied.
Byte 6
Conversion.

When the EBCDIC-to-ASCII translation flag is B'1', this parameter specifies the method that is used to convert EBCDIC input data into the default character encodation. When the EBCDIC-to-ASCII translation flag is B'0', this parameter is not used and must be set to X'00'.

For the first three values (used when the input data is encoded with a single-byte EBCDIC code page), this parameter identifies the EBCDIC code page that encodes single-byte EBCDIC bar code data. The following EBCDIC code pages are supported:
X'01'
Code page 500 (International #5).

Only 128 of the characters within ECI 000020 can be specified in code page 500. The code page 500 characters that can be translated are shown in Figure 1.

X'02'
Code page 290 (Japanese Katakana Extended).
X'03'
Code page 1027 (Japanese Latin Extended).
For the remaining values (used when the input data is SOSI), this parameter identifies the desired conversion from EBCDIC SOSI input data to a specific mixed-byte ASCII encoding.
Note: The values X'04' - X'09' are defined for the Additional Bar Code Parameters (X'7B') triplet that is used with AFP Line Data; these values are not valid within a BCOCA object that is built for a non-line-data environment, such as MO:DCA and IPDS. See Advanced Function Presentation: Programming Guide and Line Data Reference for a description of the Additional Bar Code Parameters (X'7B') triplet.
The following choices are supported:
X'04'
CCSID 1390 - CCSID 943
Convert from:
CCSID 1390 – Extended Japanese Katakana-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 943 – Japanese PC Data Mixed for Open environment (Multi-vendor code): 6878 JIS X 0208-1990 chars, 386 IBM® selected DBCS chars, 1880 UDC (X'F040' - X'F9FC').
X'05'
CCSID 1399 - CCSID 943
Convert from:
CCSID 1399 – Extended Japanese Latin-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 943 – Japanese PC Data Mixed for Open environment (Multi-vendor code): 6878 JIS X 0208-1990 chars, 386 IBM selected DBCS chars, 1880 UDC (X'F040' - X'F9FC').
X'06'
CCSID 1390 - CCSID 932
Convert from:
CCSID 1390 – Extended Japanese Katakana-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 932 – Japanese PC Data Mixed including 1880 UDC.
X'07'
CCSID 1399 - CCSID 932
Convert from:
CCSID 1399 – Extended Japanese Latin-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 932 – Japanese PC Data Mixed including 1880 UDC.
X'08'
CCSID 1390 - CCSID 942
Convert from:
CCSID 1390 – Extended Japanese Katakana-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 942 – Japanese PC Data Mixed including 1880 UDC, Extended SBCS.
X'09'
CCSID 1399 - CCSID 942
Convert from:
CCSID 1399 – Extended Japanese Latin-Kanji Host Mixed for JIS X0213 including 6205 UDC, Extended SBCS (includes SBCS & DBCS euro).
Convert to:
CCSID 942 – Japanese PC Data Mixed including 1880 UDC, Extended SBCS.

EBCDIC characters that are not defined within ECI 000020 are mapped to the substitute character, X'7F' or X'FCFC'; exception condition EC-2100 exists when an undefined character is encountered.

Exception condition EC-0F0E exists if an invalid or unsupported conversion value is specified.

Figure 1. Subset of EBCDIC Code Page 500 that can be translated to ECI 000020
Subset of EBCDIC Code Page 500 that can be translated to ECI 000020
Byte 7
Version of symbol.

This parameter specifies the desired size of the symbol; each version specifies a particular number of modules per row and column. The size of each square module is specified by the module width parameter (byte 17 in the BSD). The following table lists the complete set of supported versions. Exception condition EC-0F0F exists if an invalid version value is specified.

Table 1. Supported Version for a QR Code symbol
Version Symbol Size Version Symbol Size
0 (X'00') smallest 21 (X'15') 101x01
1 (X'01') 21x21 22 (X'16') 105x105
2 (X'02') 25x25 23 (X'17') 109x109
3 (X'03') 29x29 24 (X'18') 113x113
4 (X'04') 33x33 25 (X'19') 117x117
5 (X'05') 37x37 26 (X'1A') 121x121
6 (X'06') 41x41 27 (X'1B') 125x125
7 (X'07') 45x45 28 (X'1C') 129x129
8 (X'08') 49x49 29 (X'1D') 133x133
9 (X'09') 53x53 30 (X'1E') 137x137
10 (X'0A') 57x57 31 (X'1F') 141x141
11 (X'0B') 61x61 32 (X'20') 145x145
12 (X'0C') 65x65 33 (X'21') 149x149
13 (X'0D') 69x69 34 (X'22') 153x153
14 (X'0E') 73x73 35 (X'23') 157x157
15 (X'0F') 77x77 36 (X'24') 161x161
16 (X'10') 81x81 37 (X'25') 165x165
17 (X'11') 85x85 38 (X'26') 169x169
18 (X'12') 89x89 39 (X'27') 173x173
19 (X'13') 93x93 40 (X'28') 177x177
20 (X'14') 97x97    

If X'00' is specified for this parameter, an appropriate row/column size is used based on the amount of symbol data; the smallest symbol that can accommodate the amount of data is produced.

Byte 8
Level of error correction.

This parameter specifies the level of error correction to be used for the symbol. Each higher level of error correction causes more error correction codewords to be added to the symbol and therefore leaves fewer codewords for symbol data. See the QR Code symbology specification for more information about how many codewords are available for symbol data for each version and error-correction level combination.

Four different levels of Reed-Solomon error correction can be selected:
  • Level L (X'00') allows recovery of 7% of symbol codewords.
  • Level M (X'01') allows recovery of 15% symbol codewords.
  • Level Q (X'02') allows recovery of 25% symbol codewords.
  • Level H (X'03') allows recovery of 30% symbol codewords.

Exception condition EC-0F10 exists if an invalid level-of-error-correction value is specified.

Byte 9
Structured append sequence indicator.

Multiple QR Code bar code symbols (called structured appends) can be logically linked together to encode large amounts of data. The logically linked symbols can be presented on the same or on different physical media, and are logically recombined after they are scanned. From 2 - 16 QR Code symbols can be linked. This parameter specifies where this symbol is logically linked (1 - 16) in a sequence of symbols.

If X'00' is specified for this parameter, this symbol is not part of a structured append. Exception condition EX-0F01 exists if an invalid sequence indicator value is specified. Exception condition EC-0F02 exists if the sequence indicator is larger than the total number of symbols (byte 10).

Byte 10
Total number of structured-append symbols.

This parameter specifies the total number of symbols (2 - 16) that is logically linked in a sequence of symbols.

If X'00' is specified for this parameter, this symbol is not part of a structured append. If this symbol is not part of a structured append, both bytes 9 and 10 must be X'00', or exception condition EC-0F03 exists.

Exception condition EC-0F04 exists if an invalid number of symbols is specified.

Byte 11
Structured append parity data.

This parameter specified parity data for a structured append symbol. The parity-data value must be calculated from the entire message that is broken into structured-append symbols; the parity-data value must be the same in each of the structured-append symbols.

The parity-data value is obtained by XORing byte by byte the ASCII/JIS values of all the original input data before division into structured-append symbols.

If this symbol is not a structured append, this parameter is ignored and must be set to X'00'.

Byte 12
Special-function flags.
These flags specify special functions that can be used with a QR Code symbol.
Bit 0
UCC/EAN FNC1 alternate data type identifier.

If this flag is B'1', this QR Code symbol indicates that it conforms to the UCC/EAN application identifiers standard. In this case, the industry FNC1 flag must be B'0'. Exception condition EC-0F11 exists if an incompatible combination of these bits is specified.

Bit 1
Industry FNC1 alternate data type identifier.

If this flag is B'1', this QR Code symbol indicates that it conforms to the specific industry or application specifications previously agreed with AIM International. In this case, the UCC/EAN FNC1 flag must be B'0'. Exception condition EC-0F11 exists if an incompatible combination of these bits is specified.

When this flag is B'1', an application indicator is specified in byte 13.

Bits 2 - 7
Reserved.
Byte 13
Application indicator for Industry FNC1.
When the Industry FNC1 flag is B'1', this parameter specifies an application indicator. The application indicator is a 1-byte value that is specified either as an alphabetic value (from the ASCII set a-z, A-Z) plus 100 or as a two-digit number (00 - 99 represented as a hexadecimal value). For example:
  • For application indicator a (ASCII value X'61'), specify X'C5'.
  • For application indicator Z (ASCII value X'5A'), specify X'BE'.
  • For application indicator 01, specify X'01'.
  • For application indicator 99, specify X'63'.

When the Industry FNC1 flag is B'0', this parameter is ignored and must be set to X'00'.

Exception condition EC0F12 exists if an invalid application-indicator value is specified.