Yes Mike and Tom, this is basically the approach I envisioned. My biggest
stumbling block at this point is how I will receive the data. The only
experience I have at present is a keyboard wedge (scanner interface) where
the input field on the display file is populated by the scanner.
In the case of the 2D barcode this may be
(14 characters (individual bar code) + 1 character (comma)) * 80 entries =
1200 characters. Do I create an entry field on the display this big? I
don't think so but at this point I don't know what other options are
available.
Thanks for the help and I'll keep digging. When I do have the solution I'll
post is for the next poor sole...
Rob R.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Armbruster, Tom
Sent: May 1, 2008 10:58 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Processing a 2D barcode...
Mike is right about this process, so long as there are no commas in the
individual bar codes. That would be bad.
The first question to ask yourself is the format of the barcodes in
question. The comma delimitation is obviously a product of the scanning
software or program. That delimiter may be customizable. If so, change the
delimiter to an ASCII or EBCDIC character that would never be part of the
individual barcode. That will allow you to trap the end of the record
without interference.
If the delimiter can not be customized, the next step would be minimum
length. If you know, for example, that your end delimiter may be repeated
in the actual barcode, set a minimum length for the first occurrence to scan
for the "real" end of the input substring. In other words, if the barcode
will never less than 10 characters, don't scan for the delimiter within the
first 10 characters of the substring.
Tom Armbruster
________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx on behalf of Mike Krebs
Sent: Thu 5/1/2008 7:00 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Processing a 2D barcode...
Off the top of my head, you are going to have to read the data to a long
text field and write a parsing routine to move them to the subfile. I don't
know of any support for parsing the barcodes directly into a subfile. Can
the scanners translate the commas into some other character (like a field
exit)?
Mike Krebs
----- Original Message ----
From: Robert Rogerson <robertrogerson@xxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, May 1, 2008 1:51:33 PM
Subject: Processing a 2D barcode...
Please let me know if this is posted to the wrong list.
I am looking at how to process a scanned 2D bar code in RPG and populate a
subfile.
I have no problem when scanning a single barcode but the 2D barcode may
contain 80 individual barcodes which are comma separated.
I am checking the Web for any information but so far have found none.
Is there anyone with experience who can point me in the right direction. At
this point any help would be appreciated.
Thanks in advance,
Rob R.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.