Programming Languages on Power

 View Only

 Print DataMatrix GS1 barcode

  • RPG
Marco Riva's profile image
Marco Riva IBM Champion posted Sun August 24, 2025 06:55 PM

Hi to all.

I would like to print a DataMatrix GS1 (UCC/EAN) barcode using an AFPDS printer file with the keyword BARCODE.
The GS1 DataMatrix is formed by adding FNC1 codeword in the first position of Data Matrix ECC 200 version.

In accordance with IBM documentation (https://www.ibm.com/docs/en/i/7.6.0?topic=80-barcode-bar-code-keyword-in-printer-files) I added the keyword barcode to an alphanumeric field

example:

     A            BC2001U       50A         BARCODE(DATAMATRIX -
     A                                      (*DATAMATRIX *DFT *DFT *UCCEAN -
     A                                      *TRIM))
     A                                      POSITION(7 7)

I also tried adding the modifier parameter x'00', but the result remains unchanged.

example:

     A            BC2001U       50A         BARCODE(DATAMATRIX x'00' -
     A                                      (*DATAMATRIX *DFT *DFT *UCCEAN -
     A                                      *TRIM))
     A                                      POSITION(7 7)

In both cases the printed barcode is Data Matrix but it is not a GS1 Data Matrix. See the example in attachment "esgs1dm - example.pdf".

The same *UCCEAN parameter applied to a QRcode barcode type, however, works well and produces a GS1 type QRCode.

Example:

     A            BC2001U      200A         BARCODE(QRCODE X'02' -
     A                                      (*QRCODE 1 3 *UCCEAN *TRIM))
     A                                      POSITION(3 10.4)

Has anyone ever tried to get a Data Matrix GS1 barcode? Do you have any suggestions?

Thanks a lot.

Best regards

Marco Riva


#RPG
ac's profile image
ac

Hello Marco,

sorry never tried specifically with datamatrix.

According to the image your scanner/reader (don't know which one) is set to pass the found symbology type through as string prefix.

The DDS indeed produces a "d1" * that is plain ECC 200. Should be producing "d2" (as the online generator).

I suggest to contact IBM support on correct guidance on how to emit FNC1 (first character forGS1) and subsequent FNC1 to separate AI groups (if you use variable AI information, not this case).

  • Data Matrix
    0 ECC 000-140, not supported.
    1 ECC 200.
    2 ECC 200, FNC1 in first or fifth position.
    3 ECC 200, FNC1 in second or sixth position.
    4 ECC 200, ECI protocol implemented.
    5 ECC 200, FNC1 in first or fifth position, ECI protocol implemented.
    6 ECC 200, FNC1 in second or sixth position, ECI protocol implemented.

bye


#RPG