How to read QR codes


In KB article #320, we showed how to generate a QR code in your COBOL program.
In this article, we'll show you how to call the attached program to generate or read a QR code.

Like the earlier article, you must first download 2 jar files, and put them in your CLASSPATH.
Here's the link to the ZXing libraries (Zebra Crossing).

isQR.cbl is the program that either writes or reads a QR. An example of the code you might use to call isQR is included in CALLISQR.cbl.
When you call isQR, you'll need to pass these 5 variables:

  1. opCode:Set opCode to 0 to generate a QR code, 1 to read a QR code
  2. imgPath: The path and name of the QR code. Include extension .jpeg, .gif, .bmp, or .png
  3. qrText: The QR code's text value
  4. imgWidth: Width in pixes of QR Code when generating (0 when read)
  5. imgHeight: Height in pixes of QR Code when generating (0 when read)


  6. Article ID: 344
    Created: April 5, 2024
    Last Updated: April 5, 2024
    Author: Support KB Author

    Online URL: https://support.veryant.com/support/phpkb/article.php?id=344