Overview
The text file interface provides a mechanism for the ATT software to communicate with a management system that supports data export to and data import facilities. Two data files on the personal computer are used to communicate with the desired software package being used to manage items. Information is then exported into a file destined for the scanner as illustrated in the diagram at the bottom of this page. The scanner will populate a second file with the results of the scanning.
The text file interface is most commonly used to interface the ATT software with Microsoft Excel or a third party management software package that supports data exports to text files and data imports from text files.
The customer’s management system must first export data to a file on their personal computer, known as “toscanner.txt”. The ATT Translation and Interface software is then executed. The operator will run a data down load. This may also be referred to as a “get items” operation. This program will present the operator with a standard Microsoft Windows “Open File…” dialogue box to enable the operator to select the data file that was recently exported from the host software. It will then translate the contents into a data format suitable for the scanner. Then it will leave the resultant file in a suitable location for communicating with the scanner.
The ATT Translation and Interface software will then take item data from the device and translate it into a format suitable for the host system. It will then open a standard Microsoft Windows “Save As…” dialogue box enabling the operator to select the destination file for the translated data from the scanner. This file is usually called “fromscanner.txt” and will be referred to as such within this document. The customer will then have to perform a data import of the “fromscanner.txt” file into the software package that they are using to manage items. The customer may then perform whatever reconciliation reports are desired to show the results of this count. It is the customer’s responsibility to write whatever queries or reports are required in performing this step.
Text File Interface Configuration
The text file interface is configured using two different files, the “attconf” file, and the “flexmessconfig” file.
File Format
The table below describes the “toscanner.txt” and “fromscanner.txt” file default formats for version 3 of the ATT software. Note that all fields are character fields, and have fixed length. It is recommended that the field names supplied here be used. However, other field names should function correctly.
| Field Name | Length | Fld # | Comments |
| key | 30 | 0 | The primary key. This must have the exact contents of the item bar code. Typically this is copied from the “assetnum” field or the “inventorynum” field. |
| laststocktake | 8 | 1 | The counted date in “YYYYMMDD” format. The contents of this field are overwritten with the current date when scanning an item. |
| time | 6 | 2 | The counted time in “hhmmss” format. The contents of this field are overwritten with the current time when scanning an item. |
| counted | 1 | 3 | Flag to indicate if the item was counted. |
| multi | 1 | 4 | Flag to indicate multiple records. Used internally by ATT. |
| inventorynum | 25 | 5 | The inventory number or tag number of the item. Often used as the bar code of the item. Copy this value to the “key” field to use it as the bar code with ATT. |
| assetnum | 12 | 6 | The asset number of the item. Sometimes used as the bar code of the item. Copy this value to the “key” field to use it as the bar code with ATT. |
| compcode | 4 | 7 | Company code |
| description | 50 | 8 | Description |
| costcentre | 10 | 9 | Cost Centre |
| respcostcentre | 10 | 10 | Responsible Cost Centre |
| location | 10 | 11 | Location |
| detailedloc | 40 | 12 | Detailed Location |
| serialno | 18 | 13 | Serial Number |
| room | 8 | 14 | Room |
| plant | 4 | 15 | Plant |
| class | 8 | 16 | Class or type |
| inventorynote | 15 | 17 | Inventory note |
| validitydte | 8 | 18 | Validity date |
| sublocation | 4 | 19 | Sub location |
| controllertext | 30 | 20 | Controller text |
| assetsubnum | 4 | 21 | Asset or item sub-number |
| equipmentnum | 18 | 22 | Equipment number |
| equipcategory | 8 | 23 | Equipment category |
| functionalloc | 30 | 24 | Functional location |
| workcentre | 10 | 25 | Work centre |
| status | 4 | 26 | Status |
| maintext | 50 | 27 | Main text |
| internalorder | 12 | 28 | Internal order |
| userid | 20 | 29 | User ID. If blank, this is automatically populated with the identity of the scanner that performed the scanning. The scanner ID is the PalmOS “user name”. |
| controlid | 5 | 30 | Controller ID |
| spare2 | 5 | 31 | Spare field |
| caretaker | 10 | 32 | Caretaker |
| spare4 | 10 | 33 | Spare field |
| spare5 | 10 | 34 | Spare field |
| licenseplt | 20 | 35 | Licence Plate. This is sometimes used as a serial number if the “serialno” field is not long enough. |
| spare7 | 20 | 36 | Spare field |
| spare8 | 20 | 37 | Spare field |
| subloctext | 30 | 38 | Sub location text |
| spare10 | 49 | 39 | Spare field |
| scanstatus | 1 | 40 | Scanned verses keyed input status. Non blank for scanned input. |
Customising the File Formats
If your management software already has data export and data import capabilities, and the format of this data does not correspond with the defaults presented above, then you will need to customer the “toscanner.txt” and “fromscanner.txt” data formats. This is achieved by editing the “flexmessconfig” file. This file defines the type, and field layouts of the two data files. The type of file, along with the field lengths and the order in which the fields appear may be edited.
The ATT software supports a number of file types. These are:
- FIXED_FIELD – Fields are of fixed and known length.
- DELIMITED – Fields are separated by a delimiter character.
- PALM_DATABASE – Not suitable for use as import/export file.
- ODBC_DATABASE – Not suitable for use as import/export file.
- MAPI_MESS – Not suitable for use as import/export file.
There are also a number of variants supported by the ATT software. These are:
- NO_VARIANT– No variations to the data.
- UNDELIMITED_RECORDS – There is no separator between the end of one record and the start of the next record. Normally there is a new line between records in text files.
- QUOTED_STRINGS – Strings have double quotation characters around them, which is not part of the data.
Diagram
The diagram below displays the components involved in the communication between a generic text host and the ATT software.