Each layer involved in the input of data can be configured to adjust that data. For example, devices with integrated scanners often have control panel applets that allow you to create rules. Devices running programs like DataWedge are typically not hardware-specific, but can likewise include rules or adjustments to barcode data. Data passed from the device to StayLinked can then have StayLinked make adjustments to the data before submitting it to the telnet host. The telnet host may include its own adjustment to incoming data such as standardizing formats or data length.
The following notes and considerations may be important when deciding where barcode adjustments should be made in your environment:
On the device (DataWedge / Scan Engine) – Making adjustments at this level often require touching or configuring every device. Some third-party tools may help standardize the configuration, but different device manufacturers offer different tools and utilities for manipulating barcode data. Some manufacturers do not provide simple scan engine configuration, instead relying on third-party vendors to configure the hardware as required for their application.
In some cases, a scan beam may shine over a barcode as though it was a blank paper. When the scan beam does not acknowledge a barcode, one of two things is usually the issue:
- The scan engine is not configured to decode the barcode type, or the barcode length is outside the minimum or maximum length specific for that barcode type, or
- The barcode itself may be defective. Using another type of device to try and read the barcode is usually the best way to see if a barcode is valid. Most modern smart phones can download a free application to recognize barcodes and decode their contents.
Within StayLinked – Making adjustments to data can be configured for all devices, or groups of devices with one or more rules. StayLinked supports adjustments to barcode data in three different places. In areas 1 and 2 below, the adjustments are specific to a barcode symbology. You can confirm what StayLinked receives as the barcode type by using the StayLinked Client Scan Test as mentioned above. The three areas for barcode adjustments in StayLinked include:
- Telnet Host Entry – When you configure the rules for communicating with a telnet host, you can select the Manage pulldown menu from the top of the screen to set barcode rules that apply only to that telnet host.
- Device Groups – Rules added to the device group have priority over settings in the telnet host. This allows you to create global rules in the host entry, and then exceptions in the individual groups that require special adjustments.
- Screen Recognition – These features can be used to apply ‘Input Modifiers’ to specific screens or fields. More information on Input Modifiers can be found in the SmartTE and Screen Recognition User’s Guide.
All three of these locations support the use of regular expressions. Several common configuration options, such as trimming spaces, replacing certain characters and prefix/suffix additions can be made in the basic configuration dialogues. More complicated adjustments may require the use of regular expressions. More information on regular expressions can be found in the Regular Expression Guide, or using online materials. These expressions make up a simplified syntax for identifying patterns and returning the desired results.
At the Hosted Application – Some hosted applications may track data or restrict input based on barcode data. One example would be the use of a prefix character on barcodes that cannot be typed. When this character appears at the beginning of a barcode, the host application can strip the character off and then proceed with the transaction with the confirmation that the data has been scanned. Special prefixes may also be used to identify the type of barcode scanned, helping to eliminate the entry of incorrect barcodes into the hosted application.
Special Characters in Barcodes
Some symbologies such as GS1 can display a bracket character at the beginning of each barcode. Bracket characters are processed by StayLinked as part of a mnemonic. These mnemonics, like [enter] and [tab] perform a function instead of simply typing the word into the application. These mnemonic examples would perform [enter] as a Carriage Return and Line Feed (0x0A0D) or a tab key (0x09).
Single brackets are treated as a failed mnemonic, preventing the barcode data from being submitted to the hosted application by the StayLinked Server. The barcodes would appear in the StayLinked Client Scan Test, but the server-side test would show the issue in the Translation. Double brackets are translated as a single. The adjustment can be made in the scan engine, or at the StayLinked Server as mentioned above. The most common setting to allow the bracket character to the host application would be a substitution of the single bracket to a double bracket as shown here to the right.
Tab Characters can sometimes be entered in concatenated barcodes to split one barcode across multiple fields of data. This may work in 5250 because of the block-mode nature of the emulation. VT emulation does not contain actual fields, and involves some amount of processing between changes in displayed input location. This means VT can only parse the data across input entries if the host can process each input fast enough to keep up, or can store the data as it is entered for the forthcoming input prompts.
Some barcodes can include embedded control codes. These codes are passed on to the host application as part of the input string, but may cause the host issues if it is not prepared to handle the events. These control codes can be globally replaced in the barcode rules above by setting the replacement character. The replacement can be a standard printable character or a simple NULL value 0x00. Control codes adjusted by this setting are any value in hexadecimal below 0x20. 0x20 and codes above will not be affected by this option.
Symbology Identifiers and scanner.ini
Devices that require scanner configuration may provide an option for a symbology identifier. This value tells the program what type of barcode has been scanned. Without this option, all barcodes may be reported as a barcode type of Unknown/Unsupported. It is always important to make sure any barcode rules are applied to the correct symbology type and will not adversely affect barcodes used on other screens, of different lengths, or barcode that contain different types of data.
Devices that require customization of these symbology identifiers can use a custom configuration file called scanner.ini. More information on this configuration file can be found in the StayLinked Client User Guide for the correct version of your StayLinked Client.
Beep on Bad Scan Inputs
Only the host application knows what a correct or invalid barcode might look like. Everything in the communication chain prior to the host application simply acts as a transport. You can 'teach' StayLinked when to look for specific screen contents, but it's not a simple option and would need to be done for every desired screen.
This means you can use Screen Recognition features that trigger a beep when an error message is painted to the screen.
There's a video at the bottom of this page that will give you an idea of how the steps might work. Instead of using the Screen Designer tab, you would use the Host APIs tab to set the beep commands.
Support can help with an example or if you run into issues with this configuration. Your StayLinked reseller may also offer services options if you would like the work to be completed for you.
Share the post "Making Adjustments to Scan Input"