BARCODE (Bar Code) keyword in printer files

You use this field-level keyword to print a field as a user-specified bar code. The BARCODE keyword is valid only for Intelligent Printer Data Stream (IPDS) and host print transform printers and only for printer files with device type *IPDS or *AFPDS specified.

The format of the keyword is:
BARCODE(bar-code-ID [height] [[*HRZ | *VRT]
        [*HRI | *HRITOP | *NOHRI] [*AST | *NOAST]
        [modifier] [unit-width] [symbol-width]
        [wide/narrow-ratio]
        [PDF417 data]
        [Data Matrix data]
        [Maxicode data]
        [QR Code data]])

The bar-code-ID parameter is required. You can specify the bar-code-ID parameter as a special alphanumeric value up to 10 characters long, or as a numeric ID. Valid special values for the bar-code-ID are listed in Table 1. If you specify a numeric value for the bar-code-ID, then you also must specify the bar code modifier parameter. See the documentation for your printer for the bar-code-IDs and modifiers that it supports.

The height parameter is optional, but if you specify it, it must be the second parameter following the keyword. You can specify the height in one of two ways:
  • Specify the height in number of print lines. Valid values for the bar code height are 1-9.
  • Specify the height in inches or centimeters. When you specify the height in this way, the valid format is (height *UOM). Valid values are 0.25 to 25.40 cm (0.10 to 10.00 inches). For the PDF417 bar code type, valid values are 0.02 to 25.40 cm (0.01 to 10.00 inches). The UOM parameter on the Create Printer File (CRTPRTF) command determines the unit of measure for the height.

The value you specify for the bar code height does not include the human readable interpretation below the bar code. If you do not specify the height parameter, the printer uses a default height.

Note: For some bar codes, the height is specified by the symbology so the height given here is ignored. For other bar codes such as the GS1 Databar bar code, some modifiers require the bar code height to be at least as tall as a certain multiplier of the module width. In those cases, the height is adjusted to match the requirements of the symbology.

You can specify the last 11 parameters (all optional) in any order. Using these parameters, you can specify that BARCODE:

  • Print the bar code horizontally or vertically. The default is horizontal printing (*HRZ).
  • Include or exclude the human readable interpretation of the bar code. The default is to include the human readable interpretation printed at the bottom of the bar code (*HRI).
  • Indicate that the human readable interpretation is to be printed at the top (*HRITOP) of the bar code. (Check individual printer manuals for different bar code support of *HRITOP.)
  • Include or exclude asterisks around the human readable interpretation for CODE3OF9 bar codes. The default is to exclude the asterisks (*NOAST).
  • Select the bar code modifier. This modifier is a one-character hexadecimal value that cannot be hexadecimal FF.
  • Specify the width (in inches) of the narrow bar/space. It is specified as an expression of the form (*WIDTH value). For more information about how to specify expressions, in the DDS Concepts information. The valid values for the parameter are 0.007 through 0.208.
  • Specify the ratio of the wide bar/space to the narrow bar/space. It is specified as an expression of the form: (*RATIO value). The valid values for the parameter are 2.00 through 3.00.
  • Specify the requested symbol width for the bar code in inches. It is specified as an expression of the form (*SWIDTH value). Printers that support this parameter attempt to create the widest bar code symbol that fits within the requested symbol width specified. For these printers, the module width is ignored. The valid values are 0.00 - 9.99. If a value of zero is specified or this parameter is not specified, the requested symbol width is ignored and the module width is used to determine the bar code size.
  • Specify additional bar code information for the two-dimensional bar codes PDF417, Maxicode, Data Matrix, and QR Code. You can specify only one of these two-dimensional bar code data values. See Specifying two-dimensional bar codes for more information.
Note: The overall bar code width is dependent on:
  • Ratio or width parameter in user DDS.
  • Requested symbol width in user DDS.
  • Actual customer data in the bar code.
  • Limitations of printer hardware, such as PEL density, pins, and so on.

If you specify an optional parameter that does not apply to the bar-code-ID you have specified, the printer ignores the optional parameter.

If you attempt to print a bar code on a printer that does not support bar codes, the digits in the code are treated as text, and a diagnostic message results in stating that the bar code might not print.

The line and position you specify for the field is used as the upper left corner of the bar code. Because the line specified in the DDS is the base line (the imaginary line on which characters are printed) and this line is used as the upper edge of the bar code, the bar code appears to extend down from the bottom of the line you specify.

The following table describes valid data types, field lengths, and the numeric IDs for the BARCODE field.

Table 1. Valid bar code definitions
Bar Code ID Data type Field length Numeric ID
MSI S 1 through 31 2
UPCA S 11 3
UPCE S 10 5
UPC2 S 2 6
UPC5 S 5 7
EAN8 S 7 8
EAN13 S 12 9
EAN2 S 2 22
EAN5 S 5 23
CODEABAR A 1 through 50 13
CODE128 A 1 through 50 17
CODE3OF9 A 1 through 50 1
INTERL2OF5 S 1 through 31 12
INDUST2OF5 S 1 through 31 10
MATRIX2OF5 S 1 through 31 11
POSTNET S 1 through 31 24
POSTNET (PLANET) 5 S 1 through 31 24
RM4SCC A 1 through 50 26
AP4SCC A 8 through 39 31
DUTCHKIX A 1 through 50 26
JPBC A 7 through 50 27
PDF417 A 1 through 1850 30
MAXICODE A 1 through 138 29
DATAMATRIX A 1 through 3116 28
QRCODE A, O, G 1 through 7089 32
CODE93 A 1 through 50 33
INTELMAIL S 1 through 31 34
REDTAG S 1 through 21 35
DATABAR A 1 through 74 36

The following table describes the supported bar codes.

Table 2. Bar codes supported by DDS
BARCODE Digits per code Range of characters allowed Valid bar code modifier
MSI (changed Plessey) 311 0 through 9 01 through 09
UPC-A 11 0 through 9 00
UPC-E 10 0 through 9 00
UPC-2 digit add on (must follow a UPC A or E bar code) 2 0 through 9 00
UPC-5 digit add on (must follow a UPC A or E bar code) 5 0 through 9 00
EAN-8 7 0 through 9 00
EAN-13 12 0 through 9 00
EAN-2 digit add on (must follow an EAN 8 or 13 bar code) 2 0 through 9 00
EAN-5 digit add on (must follow an EAN 8 or 13 bar code) 5 0 through 9 00
INDUST2OF5 or Industrial 2 of 5 31 0 through 9 01 02
MATRIX2OF5 or Matrix 2 of 5 31 0 through 9 01 02
INTERL2OF5 or Interleaved 2 of 5 31 0 through 9 01-048
CODEABAR Up to 50 characters
0 through 9
A through D
(begin/end only)
- . $ / + :
01 02
CODE128 Up to 50 characters 7 Refer to CODE128 character set in DDS 012 02-056
CODE3OF9 or Code 3 of 9 Up to 50 characters
0 through 9
A through Z
(uppercase only)
- . $ / + %
and blank
01 02
POSTNET Up to 31 characters 0 through 9 Ignored
POSTNET (PLANET)5 Up to 31 characters 0 through 9 04
RM4SCC or Royal Mail Up to 50 characters
0 through 9
A through Z
00
AP4SCC or Australia Post Bar Code 13 through 39
0 through 9
A through Z
a through z
space, #
01 through 08
DUTCHKIX or Royal Mail Dutch KIX Up to 50 characters
0 through 9
A through Z
a through z
01
JPBC or Japan Postal Bar Code Up to 50 characters 0 through 9, A through Z, and - 00 013
PDF417 Up to 1850 characters 4 Any 1 byte character 00 01
MAXICODE or MaxiCode Up to 138 characters 4 Any 1 byte character 00
DATAMATRIX or Data Matrix Up to 3116 characters 4 Any 1 byte character 00
QRCODE or QR Code Up to 7089 characters 4 Any 1 byte character 02
CODE93 or Code 93 Up to 50 characters
0 through 9
A through Z
(uppercase only)
- . $ / + %
and blank
a - representing shift 1
b - representing shift 2
c - representing shift 3
d - representing shift 4
00
INTELMAIL or USPS Intelligent Mail (previously called USPS Four-State) Up to 31 characters 7 0 through 9 00-03
REDTAG or Royal Mail Red Tag Up to 21 characters 0 through 9 00
DATABAR or GS1 DataBar Up to 74 characters 7
0 through 9
A through Z
a through z
! " % & ' ( ) * + , - .
/ : ; < = > ? _
blank, and FNC1
00-04 11-1B
Notes:
  1. The 4234 Printer supports only 14 digits.
  2. The value 01 for the bar code modifier is not valid for some printers.
  3. The value 01 provides migration support for application programs that use an AFP font to print Japan Postal Bar Codes. Data written into the field must be valid characters in the AFP font. The application program must also write the start, stop, and bar code modifier characters.
  4. For PDF417, up to 1850 text characters, or 1108 bytes of binary data, per symbol, depending on the security level; refer to the symbology specification. For Maxicode, up to 93 alphanumeric characters per symbol, depending on the encoding, or up to 138 numeric characters per symbol; refer to the symbology specification. For Data Matrix, up to 3116 characters, depending on whether the data is character or numeric; refer to the symbology specification. For QR Code, up to 7089 characters, depending on whether the data is character or numeric; refer to the symbology specification.
  5. The PLANET bar code is selected by specifying the POSTNET bar-code-ID and a bar code modifier of 04.
  6. The UCC/EAN 128 (or GS1-128) bar code can be selected by specifying the CODE128 bar-code-ID and a bar code modifier of 03 or 04. The USPS Intelligent Mail Container bar code can be selected by specifying the CODE128 bar-code-ID and a bar code modifier of 05.
  7. Different modifiers have different requirements for the number of characters allowed and for the set of valid characters. Refer to the printer documentation or the symbology specification for each bar code to determine the valid values.
  8. The GS1 ITF-14 bar code (Interleaved 2 of 5 with bearer bars) can be selected by specifying the INTERL2OF5 bar-code-ID and a bar code modifier or 03 or 04.

CODEABAR field data must begin with an A, B, C, or D and must end with an A, B, C, or D. For example, A11224455C or D33447799D.

Do not specify BARCODE in the same field with the CHRSIZ, CHRID, CVTDTA, DATE, EDTCDE, EDTWRD, FONT, HIGHLIGHT, PAGNBR, TIME, or UNDERLINE keywords.

See the CVTDTA keyword for information about coding IPDS bar code commands.

If you specify CHRSIZ at the record level, it applies to all fields in that record. If you specify BARCODE in one of those fields, the BARCODE keyword is not allowed.

You cannot specify BARCODE on the same record format with BLKFOLD, CPI, or DFNCHR.

When you specify BARCODE on a numeric field, the number of decimal positions must be zero.

When you specify BARCODE on a constant field, the only valid bar-code-IDs are CODEABAR, CODE128, and CODE3OF9, and you must also specify the DFT keyword either implicitly or explicitly.

Specify DEVTYPE (*IPDS) or DEVTYPE(*AFPDS) on the CRTPRTF command when BARCODE is specified in the file.

BARCODE is allowed only on data types S and A (see Table 2 for restrictions) except for the QR Code bar code which is also allowed on O and G data types.

Option indicators are not valid for this keyword.

Japan Postal Bar Codes (bar-code-ID = JPBC) uses only the bar-code-ID parameter, the bar code print orientation parameter ([*HRZ | *VRT]), and the bar code modifier parameter. All other parameters have predetermined values, so any input for them is ignored.

User-specified bar code modifiers are not checked for their validity, and might cause bar code errors if they are not valid. The Intelligent Printer Data Stream Reference manual contains more information about bar codes and valid bar code modifiers.

Specifying two-dimensional bar codes

You can specify additional parameters for the two-dimensional bar codes PDF417, Maxicode, Data Matrix, and QR Code.

PDF417: The additional data is specified as an expression of the form:
(*PDF417 row-size number-rows security 
         [escape-indicator] [*MACRO(&data-field-name)]
         [convert-indicator] [trim-indicator])
row-size
This required parameter for the PDF417 bar code specifies the number of data symbol characters per row. Valid values are in the range of 1 through 30.
number-rows
This required parameter for the PDF417 bar code specifies the number of rows. Valid values are in the range of 3 through 90. You can specify a special value of *MIN (minimum) to instruct the printer to generate the minimum number of rows that are necessary.
security
This required parameter for the PDF417 bar code specifies the security level. Valid values are in the range of 0 through 8. Each higher security level causes more error correction code words to be added to the symbol. At a particular security level, a number of code words can be missing or erased, and the symbol can still be recovered.
escape-indicator
This optional parameter for the PDF417 bar code specifies whether the backslash character within the bar code data is treated as an escape character according to the PDF417 symbology specification. Escape characters (started with backslash) allow reader programming to be specified within the bar code data. Valid values for the escape-indicator are:
  • *NOESCAPE indicates that each backslash character found in the bar code data is treated as a normal data character and therefore all escape sequences are ignored. Specify *NOESCAPE if the bar code data is an image or binary data. *NOESCAPE is the default value if no escape indicator is specified.
  • *ESCAPE indicates that each backslash character found in the bar code data is treated as an escape character according to the PDF417 symbology specification.
*MACRO(&data-field-name)
This optional parameter allows PDF417 Control Block coding to be specified (as defined in section G.2 of the Uniform Symbology Specification PDF417). The macro-data must be specified as a program-to-system field. The field must exist in the same record format as the BARCODE keyword. The length of the macro data is limited by the rules for a record format; that is, the maximum combined length of all named fields and indicators in a record format is 32 767 bytes. The data type must be A (character), and usage P (program-to-system).
convert-indicator
This optional parameter for the PDF417 bar code specifies that the normal EBCDIC to ASCII conversion of the data is not to be done. The only valid value for the convert-indicator is *NOCONVERT. If *NOCONVERT is specified, the data is assumed to be in the default encoding (ASCII) and is not converted before the bar code is built. If this parameter is not specified, the normal translation from EBCDIC to ASCII takes place. See EBCDIC-to-ASCII translation of two-dimensional bar codes for more information about the translation.
trim-indicator
This optional parameter for the PDF417 bar code specifies that trailing blanks in the bar code data should be trimmed and not sent to the printer. The only valid value for the trim-indicator is *TRIM. If *TRIM is specified, all blanks which follow the last non-blank character in the data will be removed and not passed on to the printer. If this parameter is not specified, trailing blanks will not be removed. If *NOCONVERT is specified with *TRIM, trailing ASCII blanks (X'20') will be trimmed. Otherwise, trailing EBCDIC blanks (X'40') will be trimmed.
Maxicode: The additional data is specified as an expression of the form:
(*MAXICODE symbol-mode [zipper-indicator] [escape-indicator]
           [sequence-data] [convert-indicator] [trim-indicator])
symbol-mode
This required parameter for the Maxicode bar code specifies the symbol-mode for the MaxiCode bar code. Valid values are in the range of 2 through 6:
  • 2 – Structured Carrier Message, numeric postal code
  • 3 – Structured Carrier Message, alphanumeric postal code
  • 4 – Standard code
  • 5 – Full ECC symbol
  • 6 – Reader program, SEC. No data is transmitted.
zipper-indicator
This optional parameter for the Maxicode bar code specifies whether to print a zipper pattern and contrast block. The valid values for the zipper-indicator are:
  • *NOZIPPER indicates that a zipper pattern is not to be printed with the bar code. *NOZIPPER is the default value if no zipper-indicator is specified.
  • *ZIPPER indicates that a zipper pattern is to be printed with the bar code.
escape-indicator
This optional parameter specifies whether the backslash character within the bar code data is treated as an escape character according to the Maxicode symbology specification. Escape characters (started with backslash) allow reader programming to be specified within the bar code data. Valid values for the escape-indicator are:
  • *NOESCAPE indicates that each backslash character found in the bar code data is treated as a normal data character and therefore all escape sequences are ignored. Specify *NOESCAPE if the bar code data is an image or binary data. *NOESCAPE is the default value if no escape indicator is specified.
  • *ESCAPE indicates that each backslash character found in the bar code data is treated as an escape character according to the Maxicode symbology specification.
sequence-indicator
This optional parameter for the Maxicode bar code specifies whether this bar code is part of a structured append. The Maxicode bar code can be logically linked together to encode large amounts of data. The logically linked symbols can be presented on the same or different media and are logically recombined after they are scanned. The sequence data for the Maxicode consists of two parts of the following form:
*SEQUENCE(sequence-indicator total-symbols)

sequence-indicator specifies the structured append sequence indicator. Valid values are 0 - 8.

total-symbols specifies the total number of structured append symbols. Valid values are 2 - 8.

convert-indicator
This optional parameter for the Maxicode bar code specifies that the normal EBCDIC to ASCII conversion of the data should not be done. The only valid value for the convert-indicator is *NOCONVERT. If *NOCONVERT is specified, the data will be assumed to be in the default encoding (ASCII) and will not be converted before the bar code is built. If this parameter is not specified, the normal translation from EBCDIC to ASCII will take place. See EBCDIC-to-ASCII translation of two-dimensional bar codes for more information about the translation.
trim-indicator
This optional parameter for the Maxicode bar code specifies that trailing blanks in the bar code data should be trimmed and not sent to the printer. The only valid value for the trim-indicator is *TRIM. If *TRIM is specified, all blanks which follow the last non-blank character in the data will be removed and not passed on to the printer. If this parameter is not specified, trailing blanks will not be removed. If *NOCONVERT is specified with *TRIM, trailing ASCII blanks (X'20') will be trimmed. Otherwise, trailing EBCDIC blanks (X'40') will be trimmed.
Data Matrix: The additional data is specified as an expression of the form:
(*DATAMATRIX row-size number-rows [alternate-data-type] [reader] 
       [header-trailer] [escape-indicator] [sequence-indicator]
       [convert-indicator] [encoding-scheme] [trim-indicator])                   
You can specify the following parameters for the Data Matrix bar code, in the following order:
row-size
This required parameter for the Data Matrix bar code specifies the row size. Data Matrix bar codes are square symbols or rectangle symbols. The square symbols are 10 by 10 to 144 by 144 and the rectangle symbols are 8 by 18 to 16 by 48. A special value of *DFT can be specified to have the printer select the row size based on the amount of symbol data.
number-rows
This required parameter for the Data Matrix bar code specifies the number of rows. Data Matrix bar codes are square symbols or rectangle symbols. The square symbols are 10 by 10 to 144 by 144 and the rectangle symbols are 8 by 18 to 16 by 48. A special value of *DFT can be specified to have the printer select the number of rows based on the amount of symbol data.
alternate-data-type
This optional parameter for the Data Matrix bar code specifies the data type for the defined symbol. Valid values are:
  • *USRDEF indicates that the symbol is a user-defined symbol. *USRDEF is the default value if no alternate-data-type is specified.
  • *AIMSTD indicates that the symbol conforms to the specific industry standards as authorized by AIM international.
  • *UCCEAN indicates that the symbol conforms to the UCC/EAN application identifier standard format.
reader
This optional parameter for the Data Matrix bar code specifies whether this bar code encodes a message used to program the reader system. Valid values are:
  • *DATA indicates that bar code data is supplied. *DATA is the default value if no reader indicator is specified.
  • *RDRPRG indicates that the symbol contains a message used to program the bar code reader.
header-trailer
This optional parameter for the Data Matrix bar code specifies whether header and trailers instructions to the bar code reader are to be included. Valid values are:
  • *NO indicates that no header or trailers are to be inserted. *NO is the default value if no header-trailer value is specified.
  • *HEADER5 indicates that the bar code reader will insert a 05 Macro code word.
  • *HEADER6 indicates that the bar code reader will insert a 06 Macro code word.
escape-indicator
This optional parameter specifies whether the backslash character within the bar code data is treated as an escape character according to the Data Matrix symbology specification. Escape characters (started with backslash) allow reader programming to be specified within the bar code data. Valid values for the escape-indicator are:
  • *NOESCAPE indicates that each backslash character found in the bar code data is treated as a normal data character and therefore all escape sequences are ignored. Specify *NOESCAPE if the bar code data is an image or binary data. *NOESCAPE is the default value if no escape indicator is specified.
  • *ESCAPE indicates that each backslash character found in the bar code data is treated as an escape character according to the Data Matrix symbology specification.
sequence-indicator
This optional parameter for the Data Matrix bar code specifies whether this bar code is part of a structured append. The Data Matrix bar code can be logically linked together to encode large amounts of data. The logically linked symbols can be presented on the same or different media and are logically recombined after they are scanned. The sequence data for the Data Matrix consists of three parts of the following form:
*SEQUENCE(sequence-indicator total-symbols file-id)

sequence-indicator specifies the structured append sequence indicator. Valid values are in the range of 1 through 16.

total-symbols specifies the total number of symbols that is logically linked in a sequence of symbols. Valid values are in the range of 2 through 16.

file-id specifies a 2 byte unique file identification for a set of structured-append symbols. When specifying the file-id, the format is X'nnnn', where nnnn is the 2 byte file ID in hexadecimal.

convert-indicator
This optional parameter for the Data Matrix bar code specifies that the normal EBCDIC to ASCII conversion of the data should not be done. The only valid value for the convert-indicator is *NOCONVERT. If *NOCONVERT is specified, the data will be assumed to be in the default encoding (ASCII) and will not be converted before the bar code is built. If this parameter is not specified, the normal translation from EBCDIC to ASCII will take place. See EBCDIC-to-ASCII translation of two-dimensional bar codes for more information about the translation.
encoding-scheme
This optional parameter for the Data Matrix bar code specifies the encoding scheme used to produce the bar code symbol. Valid values are:
  • *DEVDFT - this encoding scheme indicates that the BCOCA receiver uses a device-specific method of selecting and switching among encoding schemes. *DEVDFT is the default if no encoding-scheme is specified.
  • *ASCII - this encoding scheme produces 4 bits per data character for double digit numerics, 8 bits per data character for ASCII values 0-127, and 16 bits per data character for Extended ASCII values 128-255.
  • *C40 - this encoding scheme is used when the input data is primarily uppercase alphanumeric and produces 5.33 bits per data character.
  • *TEXT - this encoding scheme is used when the input data is primarily lowercase alphanumeric and produces 5.33 bits per data character.
  • *X12 - this encoding scheme is used when the input data is defined with the ANSI X12 EDI data set and produces 5.33 bits per data character.
  • *EDIFACT - this encoding scheme is used when the input data is ASCII values 32-94 and produces 6 bits per data character.
  • *BASE256 - this encoding scheme is used when the input data is binary (for example image or non-text data) and produces 8 bits per data character.
  • *AUTO - this encoding scheme indicates that the BCOCA receiver starts with ASCII encoding and switches between encoding schemes as needed to produce the minimum symbol data characters.
trim-indicator
This optional parameter for the Data Matrix bar code specifies that trailing blanks in the bar code data should be trimmed and not sent to the printer. The only valid value for the trim-indicator is *TRIM. If *TRIM is specified, all blanks which follow the last non-blank character in the data will be removed and not passed on to the printer. If this parameter is not specified, trailing blanks will not be removed. If *NOCONVERT is specified with *TRIM, trailing ASCII blanks (X'20') will be trimmed. Otherwise, trailing EBCDIC blanks (X'40') will be trimmed.
Note: When a structured append is specified, you must specify *NO for the header and trailer, and you must specify *DATA for the reader. For valid combinations of row-size and number-rows, see the symbology specification.
QR Code: The additional data is specified as an expression of the form:
(*QRCODE verson error-correction [alternate-data-type]
         [escape-indicator] [sequence-indicator]
         [convert-indicator] [trim-indicator])                   
You can specify the following parameters for the QR Code bar code, in the following order:
version
This required parameter for the QR Code bar code specifies the requested size of the symbol; each version specifies a particular number of modules per row and column with the size of each square module determined by the module width parameter. The valid values are 0 - 40. If 0 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.
error-correction
This required parameter for the QR Code bar code specifies the level of error correction to be used for the symbol. Each higher level of error correction causes more error correction code words to be added to the symbol and therefore leaves fewer code words for symbol data. Refer to the QR Code symbology specification for more information about how many code words are available for symbol data for each version and error-correction level combination. Four different levels of Reed-Solomon error correction can be selected:
  • 0 - Level L allows recovery of 7% of symbol code words
  • 1 - Level M allows recovery of 15% of symbol code words
  • 2 - Level Q allows recovery of 25% of symbol code words
  • 3 - Level H allows recovery of 30% of symbol code words
alternate-data-type
This optional parameter for the QR Code bar code specifies the data type for the defined symbol. Valid values are:
  • *USRDEF indicates that this symbol is user-defined. *USRDEF is the default value if no alternate-data-type is specified.
  • *AIMSTD (application-indicator) indicates that the symbol conforms to the specific industry or application standards as authorized by AIM international. The application-indicator is a numeric value 0 - 255.
  • *UCCEAN indicates that the symbol conforms to the UCC/EAN application identifier standard format.
escape-indicator
This optional parameter for the QR Code bar code specifies whether the X'5C'(¥) character within the bar code data is treated as an escape character according to the QR Code symbology specification. Escape characters allow reader programming to be specified within the bar code data. Valid values for the escape-indicator are:
  • *NOESCAPE indicates that each X'5C' (¥) character found in the bar code data is treated as a normal data character and therefore all escape sequences are ignored. Specify *NOESCAPE if the bar code data is an image or binary data. *NOESCAPE is the default value if no escape indicator is specified.
  • *ESCAPE indicates that each X'5C' (¥) character found in the bar code data is treated as an escape character according to the QR Code symbology specification.
sequence-indicator
This optional parameter for the QR Code bar code specifies whether this bar code is part of a structured append. The QR Code bar code can be logically linked together to encode large amounts of data. The logically linked symbols can be presented on the same or different media and are logically recombined after they are scanned. The sequence data for the QR Code consists of three parts of the following form:
*SEQUENCE(sequence-indicator total-symbols parity-data)

sequence-indicator specifies the structured append sequence indicator. Valid values are in the range of 1 through 16.

total-symbols specifies the total number of symbols that is logically linked in a sequence of symbols. Valid values are in the range of 2 through 16.

parity-data specifies 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 should be the same in each of the structured-append symbols. Valid values are in the range from 0 through 255.

convert-indicator
This optional parameter for the QR Code bar code specifies whether the BCOCA receiver is to translate the data from EBCDIC to ASCII or whether the data is already in ASCII. The valid values for the convert-indicator are:
  • *NOCONVERT - The data will be assumed to be in the default encoding (ASCII) and will not be translated before the bar code is built.
  • *CONVERT(conversion-type) - The data will be translated from EBCDIC to ASCII before the bar code symbol is produced. The translation that will be used will be based on the conversion-type value given. The valid values for the conversion-type are 1 though 9. For types 1-3, this translation will be done by the printer. These types are the only types supported by IPDS printers. For types 4-9, the translation to ASCII will be done by the system before the data is sent to the printer. See EBCDIC-to-ASCII translation of two-dimensional bar codes for more information about the translation. The values and their meanings are as follows:
    • 1 - convert from EBCDIC code page 500 to ASCII
    • 2 - convert from EBCDIC code page 290 to ASCII
    • 3 - convert from EBCDIC code page 1027 to ASCII
    • 4 - convert from EBCDIC CCSID 5026 to ASCII CCSID 943
    • 5 - convert from EBCDIC CCSID 1399 to ASCII CCSID 943
    • 6 - convert from EBCDIC CCSID 5026 to ASCII CCSID 932
    • 7 - convert from EBCDIC CCSID 1399 to ASCII CCSID 932
    • 8 - convert from EBCDIC CCSID 5026 to ASCII CCSID 942
    • 9 - convert from EBCDIC CCSID 1399 to ASCII CCSID 942
If this parameter is not specified, the printer will translate from EBCDIC code page 500 to ASCII before producing the symbol as if *CONVERT(1) was specified.
trim-indicator
This optional parameter for the QR Code bar code specifies that trailing blanks in the bar code data should be trimmed and not sent to the printer. The only valid value for the trim-indicator is *TRIM. If *TRIM is specified, all blanks which follow the last non-blank character in the data will be removed and not passed on to the printer. If this parameter is not specified, trailing blanks will not be removed. If *NOCONVERT is specified with *TRIM, trailing ASCII blanks (X'20') will be trimmed. Otherwise, trailing EBCDIC blanks (X'40') will be trimmed.

EBCDIC-to-ASCII translation of two-dimensional bar codes

The two-dimensional bar codes PDF417, Maxicode, Data Matrix, and QR Code are ASCII bar codes. Unless the convert-indicator specified for these bar codes indicates that no conversion is to be done, the system will translate the data to an expected EBCDIC or ASCII code page. To do this translation, the system extracts the CCSID of the job that generated the spooled file and translates the EBCDIC data to code page 500 for PDF417, Maxicode, and Data Matrix bar codes. The printer then translates the data from code page 500 to the appropriate ASCII code page before producing the bar code symbol.

For QR Code bar codes, the system translates the data to various code pages depending on the conversion type specified. For conversion types 1 through 3, the system translates the data from the CCSID of the job to EBCDIC code pages 500, 290, or 1027. The printer then translates the data from those expected EBCDIC code pages to the appropriate ASCII code page before the bar code symbol is produced. For conversion types 4 through 9, the system assumes that the data is either in EBCDIC CCSID 5026 or 1399 and translates the data to ASCII CCSIDs 943, 932, or 942. The printer does no further translation before producing the bar code symbol.

When the printer creates the bar code symbol, Maxicode and Data Matrix bar codes are assumed to be in 8859-1 code page. The IBM® equivalent is ASCII code page 819. ASCII code page 437 is used for PDF417 and ASCII code page 897 is used for QR Code conversion types 1-3.

Example

The following example shows how to specify the BARCODE keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A            FIELD1        11S  O  2  4BARCODE(UPCA 6)
     A            FIELD2         3A    10  6BARCODE(CODE30F9 4 *NOHRI-
     A                                      *AST X'02')
     A            FIELD3        10S  O  4  5BARCODE(UPCE 6 (*RATIO 2.75) *HRZ +
     A                                      X'00' (*WIDTH .02))
     A            FIELD4        10A  O  5  5BARCODE(CODEABAR 1 (*RATIO 2.1) +
     A                                      *HRITOP)
     A                                  6  5'01234567'
     A                                      BARCODE(CODE128 2 *HRITOP *HRZ +
     A                                      (*WIDTH 0.1) (*RATIO 2) X'01')
     A            FIELD5        10A  0 12  5BARCODE(CODEABAR (2.0 *UOM))
     A            FIELD6        10S  0 15  5BARCODE(10 X'01')
     A            FIELD7        25A    24 45BARCODE(QRCODE 1 *HRZ +
     A                                      X'02' (*WIDTH .05) (*SWIDTH 1.5) +
     A                                      (*QRCODE 4 1 *CONVERT(1) +
     A                                      *TRIM *AIMSTD(99)))