how can I split this barcode by group separator with Progress? I’ve tried chr(29) without any luck.
Barcode scanned into Notepad++: https://i.stack.imgur.com/7YIbw.png
Barcode scanned into input field: 2409271405202120330017100282
Thanks.
def var c as char no-undo.
def var i as int no-undo.
update c format "x(50)".
do i = 1 to length(c):
message substr(c, i, 1) = chr(29).
end.
The problem is that GS is an undefined control code. So you need to make it be recognized.
Add the following to your terminal’s entry in protermcap to define GS as F13:
:(F13)=\035:\
(The octal code for GS is \035 and F13 is an undefined function key — so the combination should work. I don’t have a scanner to test with but this works for the control codes that I can type into my keyboard…)
Then use code like this:
This should cause “.” to be inserted instead of GS. Which will allow you to parse the string using “.” rather than GS.