Does anyone know of a way to scan a barcode entrys into an AS/400 display file, but not allow the scan ID to be manually entered from the keyboard?

45 pts.
Barcode scanning
iseries v5r4
Hi all,

I am developing a new application that scans vendor bar-codes into our system and translates the Scan ID into the part#'s used by our business.  My business has a requirement that the only method of entry is via a bar-code scanner.  The scan ID cannot be manually entered into the application. If manual entry is needed for any reason, the user is required to perform the manual entry from a different screen.  The reason for this is they want to be able to tell what parts are being scanned vs what parts are manually entered in order to determine compliance metrics for our bar-code scanning initiative.

I know if I leave the Scan ID field as Input capable, the scanning works just fine.  Everything I have tried to block keyboard entry on this field also blocks input from the bar-code scanner. 

I have been told that other companies are able to perform bar-code scanning in this manner using an AS/400, but i can find no information about how this could be done.

I would appreciate any information or help that you could provide.

Thank You,


Software/Hardware used:
i-series, V5r4

Answer Wiki

Thanks. We'll let you know when a new response is added.

Thank you for all your input on this problem. Adding a prefix to the scanned data and using a non-display field was my preferred method to handle this problem. I would have liked to make the prefix a symbol the user does not have access to (like a registered trademark symbol), but our scanner is limited to characters found on the keyboard.

When I presented this solution I was told that it would not be acceptable because “all the user has to do is open Notepad, scan a few parts and they would quickly learn what the prefix was they need to add”. The company is going to be calculating metrics based on what is scanned vs. what is not getting scanned and they are worried about users being able to manipulate the data in their favor. I know this ultimately is a personnel issue, but in the meantime I do need to do all I can to make sure they are not able to manipulate the system.
To get around this, the solution I have come up with is to have the scanner append 2 suffixes to the scanned data. A F18 followed by a F9 for example. If the two function keys are pressed in the correct order after the barcode ID has been entered, then this is a scanned Item. If the user keys in a barcode ID and presses Enter, it will still be processed, but the entry will be flagged as “Not Scanned” .

Hopefully the user will not be able to determine the sequence of function keys required to qualify as a “Scanned” entry.

Discuss This Question: 7  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Farmer
    I had to do the same thing for my company. If scanned the value of the first 2 positions was a +H. We don't and never will have Item numbers that start with +H so this made for an easy check. So all I had to do in my program was if I didn't find +H in the first 2 positions I knew they keyed in something into the field via keyboard. So I would just throw up an error message stating that they must scan the Item Number, no manual entry was allowed. Hope this helps!
    10 pointsBadges:
  • TomLiotta
    Why couldn't some type "+H" in the first two positions? Tom
    125,585 pointsBadges:
  • slateken
    I use a similar approach. As Tom mentioned, it is not "foolproof", but so far it has sufficed. I set up the scanner(s) to send a 3 character prefix for each scan. (How-to information can be found in the scanner manual). I try to set the prefix up to send at least one character that a user would not normally type (a left or right bracket for instance). Then I added a 3-position alpha field to the DDS to handle the prefix -- this is the field that is checked for validity as Farmer does. I set this field up to be "Non-Display" so that the user does not even see the prefix when the scan is sent to the display. For every scan, this field is tested to determine that the 3 character PREFIX field exactly matches. I have the input field for the actual barcode data set up as NON-DISPLAY also so that they do not even see the scanned data until it has passed the validity check. Sample DDS:
    A            PREBARNUM      3A  B  6 42CHGINPDFT(CS)   
    A                                      DSPATR(HI)      
    A                                      DSPATR(ND)      
    A            BARNUM        15A  B  7 42CHGINPDFT(CS)  
    A                                      DSPATR(HI)     
    A                                      COMP(GT ' ')   
    A                                      CHECK(ER)      
    A                                      DSPATR(ND)     
    230 pointsBadges:
  • TomLiotta
    @Slateken: Nice addition. Perhaps not "foolproof" but well worth the minimal extra effort. It's probably all that's needed to be included. Tom
    125,585 pointsBadges:
  • Code2live
    We have an application which uses a barcode containing the number with a check digit on the label to be scanned. But the human-readable number shown does not contain the check digit. So if they are trying to type it, they never know the correct last digit. (You might want to limit their "tries", in case they're persistent and try all ten digits!) Combining that with the other suggestions (such as Non-displaying the barcode input) would be almost indefeatable! Users have a manual entry screen separate from the barcode input screen, but requires supervisor access. Btw: we store the identifying number with it's check digit for each of lookup (using program code of course) but no users can view the table/file. We also store the Id as a value in the table/file, so the support personnel can see it. Hope this helps!
    55 pointsBadges:
  • TomLiotta
    So the scanner can input its own data? Can it be variable such as a sequence number? How "programmable" is the scanner? Tom
    125,585 pointsBadges:
  • ToddN2000
    The check digit is a nice way. My question is are the barcodes being scanned created by you or the vendor ? If by the vendor and they do not currently contain the check digit it may not be easy to get them to change their procedures as it would impact their customer base. Slateken idea with the non-display seems like a good alternative. 
    136,960 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: