How to read QR codes

Question ID : 344
Created on 2024-04-05 at 10:55 AM
Author : Veryant Support [support@veryant.com]

Online URL : http://support.veryant.com/support/phpkb/question.php?ID=344



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. Back to Original Question