ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Scanning 2D barcode - How to read GS, RS and EOT into a 2D Barcode?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scanning 2D barcode - How to read GS, RS and EOT into a 2D Barcode?

    Hi All,

    I have a 2D barcode that I need to scan, strip out values 06, P00578501, T201818.0U and then process. The 2D barcode is encoded with control chars.

    example: RS06GSP00578501GST201818.0URSEOT

    RS GS and EOT being the control chars.

    When I try to scan the barcode into a display field. Char 30 it reads the first two digits 06 and then puts the cursor in the protected area of the display. So I am not 100 sure how to configure the field to read the barcode correctly.

    Does anyone have any ideas. I think I can configure the scanner to convert unknown chars to code 39 but I can't do that today.

    Cheers

  • #2
    Hi,

    I am currently making a handscanner application, I'm assuming you're running a 5250 emulation on the scanning device?
    First off, if so and you have any kind of say in the application you're developing I would recommend either going for a mobile application or using php, that's what I'm doing and everything is going way faster than planned.

    First off, char(30) might be too small of a field size depending on your logic before putting the barcode's data into the field. Also "RS", "GS" and "RSEOT" are encoded so you will have to decode them on scan I presume, though I'm not 100% certain. I believe for many they come in as hex values which could explain why your cursor jumps in a protected area as hex values can be used to position cursor. A lot depends on how your scanner is configured and your business logic. So helping you out is a little difficult as little information is provided. Depending on the encoding type you may find help in the following link (example of an ASCII encoded 2d scanner):


    Anyways best of luck, I know how hard applications like this are.. Over 95% of our old application is written in RPG older than I am. Not an easy project.

    Comment


    • #3

      Hello,

      I have the same problem.

      Can you tell me how you solved it?




      Thanks



      Comment

      Working...
      X