× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks, Bill.

I tested a scan with a linear (1d) barcode, and the system read it
without incident in an AS400 session. So this leads me to believe that
it's probably a setting I need to make on the scanner to have it read QR
-> EBCDIC.

/b;

-----Original Message-----
From: Bill Wragg [mailto:bill_wragg@xxxxxxxx]
Sent: Saturday, September 29, 2007 12:05 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: 2d Barcode Scan Results - Questions

We wrote applications using ck30s and yes the socket program translates
from ascii to ebcdic and back before sending to the ck30s.

Your are using a 5250 emulator on the ck31, thenit should need
translation, the 5250 emul;ator shoul;d translate? we don't we 5250
emulator, we use a c# app on the ck30 to send to tcpip socket running on
the iseries.

Good Luck
Bill


----- Original Message ----
From: Brian Piotrowski <bpiotrowski@xxxxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, September 28, 2007 3:56:55 PM
Subject: RE: 2d Barcode Scan Results - Questions


Yes, the scanner is essentially someone typing in the characters really,
really fast.

The data appears to be corrupt as the scanner is reading it through the
AS400 terminal session. However, through the scan test module built
into the terminal emulator, it works fine.

/b;

-----Original Message-----
From: Mike Krebs [mailto:mkrebs@xxxxxxxxxxxxxxxxxx]
Sent: Friday, September 28, 2007 3:22 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: 2d Barcode Scan Results - Questions

Is the scanner emulating a keyboard? Are you reading a serial port?

Is the data corrupt in the 255A field? I assume you are reading that on
a
terminal someplace. If not, where is this field (web page, PC program,
what)?

Mike Krebs

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Brian Piotrowski
Sent: Friday, September 28, 2007 1:26 PM
To: RPG programming on the AS400 / iSeries
Subject: 2d Barcode Scan Results - Questions

Hi All,



I'm in the middle of writing some programs that use the data from a 2d
barcode scan and push it do an SQL database. However, I'm encountering
some
problems with the scan and I'm wondering I need to do something special
to
code it to read properly?



I wrote a really quick program that simply takes the scan and writes it
to a
table. If I use my program to scan, the scanner will read garbled data
and
write it to the table. However, if I use the scan test program built
into
the terminal and scan the exact same 2d barcode, the data is represented
properly.



The data is being written to a 255A field and ultimately to a
varchar(255) field in the database. However, the data is corrupt even
before it hits the db. The labels are of QR type (Japan labels) and are
being read from an Intermec CK-31 scanner.



Anyone have any ideas on what to check? I'll post me code to see if
there's
anything obvious that I'm missing.



Thanks!



/b;



Code to follow

RPGLE:

A****************************************************************

A* *

A* PROGRAM ID : SCAN2DR *

A* DESCRIPTION : Scan a 2d Barcode *

A* PURPOSE : When a 2d barcode is scanned, the system will*

A* write the data to CAP2DBC. *

A* *

A* PROGRAMMED BY : B. Piotrowski DATE : 09/28/2007 *

A****************************************************************

A* SUMMARY OF CHANGES *

A****************************************************************

A* DATE PROGRAMMER COMMENTS *

A*--------------------------------------------------------------*

A* 09/28/2007 B. Piotrowski Initial Release *

A****************************************************************

FSCAN2DD CF E Workstn

F IndDS(WkStnIndics)

D WkStnIndics DS

D Exit 3 3N

D

D

D*

D SQLstmt S 1000A INZ varying

D Plantcode S 1A Inz

D USRMESSAGE S 25A Inz

C*

C*

/free



DoW not Exit;

ExFmt prompt_fmt;

if exit;

leave;

ENDIF;

if serialno = '';

USRMESSAGE = 'Please Scan a 2d Barcode!';

serialno ='';

else;

EXSR Write2DBCInfo;

endif;

EndDo;



*InLR = *on;



// Subroutines

BegSR *InzSR;

USRMESSAGE = ' PLEASE SCAN A 2D BARCODE';

serialno = '';

EndSR;



BegSR Write2DBCInfo;

/end-free

c/exec SQL

c+ insert into CAP2DBC VALUES (:serialno)

c/end-exec

C*

/free

IF SQLCOD = 0;

USRMESSAGE = ' Data Written!';

//serialno = '';

else;

USRMESSAGE = ' Data Error!';

serialno = '';

endif;

EndSR;

/end-free



DDS:

A****************************************************************

A* *

A* PROGRAM ID : SCAN2DD *

A* DESCRIPTION : Scan a 2d Barcode *

A* *

A* PROGRAMMED BY : B. Piotrowski DATE : 09/28/2007 *

A****************************************************************

A* SUMMARY OF CHANGES *

A****************************************************************

A* DATE PROGRAMMER COMMENTS *

A*--------------------------------------------------------------*

A* 09/28/2007 B. Piotrowski Initial Release *

A****************************************************************

A CA03(03 'MENU')

A INDARA

A** PROMPT SCREEN

A R PROMPT_FMT OVERLAY

A 1 3' 2D BARCODE ID '

A DSPATR(HI RI)

A USRMESSAGE 25A 2 1

A DSPATR(HI RI)

A 3 1'2D Barcode #:'

A 4 5'F3 = CANCEL'

A SERIALNO 255A B 5 1CHECK(ER) DSPATR(UL)

A*





-=-=-=-=-=-=-=-=-=-=-=-=-=-
Brian Piotrowski
Assistant Mgr. - I.T.
Simcoe Parts Service, Inc.
Ph: 705-435-7814 x343
Fx: 705-435-6746
-=-=-=-=-=-=-=-=-=-=-=-=-=-



--
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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.