Shirt Pocket Data Collection
If you are looking for a low cost, portable, bar code data collection device, this article may be for you. Videx has a product called the Timewand that might provide the perfect solution to many data collection/data entry needs.
At less than $300 for a Videx Timewand (the charger/download station is extra), the Videx Timewand may well be one of the best bar code data collection values around.
In my last article on bar coding, I discussed the differences between on-line data entry and off-line data collection modes of bar code usage. In deciding which is most appropriate, the key question remains do you need the data in "real-time" or can it be collected, batched and utilized later.
Interestingly, many, if not most, bar code data collection applications can be done in an off-line, batch mode. For instance; time and attendance, labor job costing, records management, physical inventory taking, and others all are adaptable to off-line data collection and analysis.
Not only does the Timewand read bar codes, it "stamps" each one with the time and date the bar code was scanned. That information makes the Timewand ideal for applications such as time and attendance or labor job costing where start and stop times are critical.
In addition, a lot of useful information can be obtained from time stamping applications you wouldn't normally associate as needing time information. For instance, analyzing the time stamps in an inventory application can produce productivity information and point to possible areas within a warehouse that require material reorganization to make handling that material more efficient.
A Pocket Wonder
I first saw the Videx Timewand almost three years ago at Comdex, a trade show for the microcomputer industry. When I saw it, visions of all sorts of applications ran through my head. For the Videx Timewand was a truly programmable data collection device that fit into a shirt pocket.
To give you an idea of exactly what size the Videx Timewand is, collect 7 standard U.S. credit cards from your wallet or friends. Stack them one on top of the other and you are looking at a Videx Timewand. The Timewand is pictured in figure 1.
The Videx Timewand is exactly the same length and width as a credit card. It is 5/16 inch thick, whereas the embossed part of a credit card is just under 1/16 inch and the unembossed part is about 1/32 inch.
It does weigh more than 7 credit cards, although it doesn't weigh very much. The Videx Timewand weighs just under 2 ounces, whereas 7 credit cards weigh about 1 ounce.
As for its packaging, it is an engineering marvel. There is only one button, no connectors, an LED, and the scanner. I am reminded of the computer cartoon I saw recently that showed a salesman showing off a computer with only on and off switches. The caption read "the software does the rest". That's also true with the Videx Timewand.
The one button is used to tell the Timewand to "wake up" from a semi-dormant state it rests in to conserve battery power and to scan a bar code. You simply press the button and hold it, scan the bar code, and release the button when you are done.
If you successfully scan the bar code, you will be "rewarded" with a flash of a built-in LED and a beep. The original Timewand's didn't include the LED, but experience in the field showed that in noisy environments the audio feedback alone wasn't sufficient, so Videx added the LED.
In fact, the speaker is the Timewand's primary method of telling you what is going on so it makes quite a number of noises. There's the standard beep, either singly or a series of three. There also is an ascending tone, called the up beep, and a descending tone, called the down beep. When combined in various combinations, the Videx Timewand has a "vocabulary" of nine standard indications.
Next is the infra-red scanner. It is a light source and sensor in one integrated unit that protrudes from one corner of the Timewand. It projects a beam of infra-red light onto the bar code being "read" and measures the reflection of the surface. Light areas reflect more than dark (black) areas.
By sampling the intensity of the reflected light many times a second, the Timewand is capable of measuring the width of the light and dark bands that make up bar codes. Then, knowing what bar code topology, or group of topologies, is being read the Timewand can decode the pattern of white and black into useful data.
The charger/downloading station serves two uniquely engineered purposes. Remember the Timewand doesn't have any connectors. And it cannot be taken apart to change the batteries. Instead the two sides of the case each serve as the connector for the battery to receive its charge. Contacts inside the charger slide up on each edge of the two sides and charge the internal battery. So while you are downloading the data and uploading a new program, the battery is getting its charge (although the data communications doesn't take as long as recharging the battery).
The way the Timewand communicates with its host computer is also quite unique. Early versions of the Timewand used the infra-red scanner to send and receive a kind of morse code to and from the recharger/downloading station. In recent versions, including the one I am using, that data is now transmitted through the recharging contacts. From what I understand, when the power is a constant voltage, it is for recharging the battery. However rapidly changing voltages, representing digital pulses, are used to send/receive information. This method has proven itself more reliable than using the infra-red sensor.
In addition to the single Timewand charger/downloading station, Videx also offers a modular multiple unit charger/downloading station. It consists of a control unit and up to 25 Timewand receptacles. Thus, if you are supporting a group of Timewands, you don't need to wait to download or charge each one separately.
Finally, there are two memory options for the Videx Timewand. It comes in 8K and 16K versions, representing roughly 1000 and 2000 scans of a 6 character code 39 bar code. Those numbers include the Timewand's built-in time and date stamping of each bar code scan. There used to be a even less expensive 2K version that I wouldn't have recommended due to its limited cost savings and low number of scans (only 191). But the recent RAM memory shortages and price increases have force the discontinuance of that model.
Multiple Bar Code Reading
The Videx Timewand is capable of reading a number barcodes. However, unlike some autodiscriminating bar code readers, such as the "keyboard wedge readers" I will talk about in my next article, you need to tell the Timewand which topology or topologies are going to be used. That's because rather than use up a lot of the Timewand's memory with ability to decode many different topologies, the designers of the Timewand chose instead to include a minimal functionality and let the user/designer decide what is needed. The result is minimal memory (read that battery power) usage, at maximum functionality.
The Videx Timewand, after downloading the appropriate software, will recognize the following bar code topologies: Code 39, Interleave 2 of 5, UPC, EAN, JAN and Codabar. A complete list of the Timewand bar code reading options is included in figure 2.
In addition, you can select a "bar code keypad", shown in figure 3. The bar code keypad is a credit card sized group of small barcodes that the user can assemble into a single barcode by scanning them one at a time. The bar code keypad allows you to "create" barcodes when they don't otherwise exist.
We have used the bar code keypad in our sales reporting system for exceptional conditions noting. Thus, when a salesman encountered something, such as a competitive pricing situation, that didn't have a pre-assigned and pre-printed bar code, he could make up his own code (within guidelines) to capture the necessary information.
Another example of the use of the bar code keypad would be during the conversion to bar codes in an inventory control application. In our warehouse, for instance, we have about 6,000 stock keeping units representing about a million pounds of material stored in an 82,000 square foot warehouse. To simply declare that we are going to go label each carton with a barcode is unrealistic. As an alternative, we have decided to bar code each incoming carton and put bar codes on the shelves where the material is stored for those cartons already in stock. However, occasionally we have overstock material stored in a second location. During a physical inventory, we can use the bar code keypad to record the overstock material without the effort of tracking down every carton and making sure it has a bar code.
Structured Data Entry
When first investigating the Timewand, I envisioned applications that would include collecting several pieces of information over a period of time and organizing them. Without knowing anything about how the Timewand, I had designed mechanisms to structure that data so it could be correlated and to make identification of missing data easier.
Obviously, the engineers at Videx saw similar applications and the associated problems because they have included two related data entry structuring options in the collection of available data entry programs.
Before getting into those options, let me relate an example of the kind of data that will show why structuring data is important. Suppose the Timewand is being used in a labor job costing environment. You might have 15 employees, 20 to 50 activities (each with start and stop operations), and any number of materials you want to keep track of.
One option would be to create a unique bar code for each combination of employee, activity and/or material. The problem with this option is the number of bar codes quickly gets out of hand. In our example, you might be talking about 20,000 to 50,000 different combinations. That means that many bar codes. The net result would be a large book and terrible maintenance problems.
The alternative would be to assign each employee a code, each activity a code and each material a code. Then rather than scan a single code that represents the combination, the user would scan their id code, the activity or material code, and enter the quantity (using the bar code keypad). Thus instead of thousands of bar codes there are less than 100.
But for this technique to work, the codes should be organized so the software supporting the system can quickly differentiate between a user id, activity code, material code or quantity. This is done by structuring the codes by either assigning ranges, if the codes are strictly numeric (i.e. 0-7999 for quantities, 8000-8499 for employees, 8500-8999 for activities, and 9000-9999 for material codes), or by assigning prefixes if alphanumeric codes are used (i.e. all employee codes start with E, all activities start with A, all materials start with M, and quantities are strictly numbers).
In addition, there must be controls and checks while the data is being collected. Unfortunately, while the number of codes required is significantly reduced using separate codes for employees, activities, materials and quantities, it is far, far too easy for one or more of those pieces of data to be left out when it is necessary to scan several pieces of data to make up a single record.
That's where the engineers at Videx have helped. They have included two different ways to organize your data collection to support this kind of data collection. Those two data organizations are hierarchy and groups. The two are basically the same except for the strictness of the data collection.
Hierarchy data collection defines a set of rules for scanning the various classifications of bar codes. Each classification is assigned a priority, or hierarchy, number. The highest levels (in my example the employee id) is followed by one or more lower levels (in my example the activities and/or materials). Those can be followed by even lower levels up to a maximum nesting level of 42. For most applications, the maximum nesting level rarely exceeds 4 or 5 levels.
In hierarchy data collection, you must work in a predetermined sequence. You must first scan a data entry at the highest level, followed by the next lower level, then the next lower level, and so on. However, to keep the number of data items scanned, and therefore stored in the Timewand's limited memory, you don't need to go back to the beginning of the sequence. You only need backup the number of levels necessary.
As an example, you only need scan your employee id once. Then you can scan activity codes and material codes until the next shift when the next person will scan their employee id. And, when you scan a material code, you can then "legally" scan a quantity; which is defined as a lower level in the sequence. The good news is, with the hierarchy organization, you won't have to scan a "dummy" quantity when entering an activity code. Only that data that is necessary need be scanned.
What happens if you don't scan the right code at the right time? The Timewand will "beep" to let you you know the data is incorrect and discard that data. Rescan the right data and you are right back on-track.
In some circumstances, it is necessary to impose even stricter controls on the order of data collection. For instance, if several people are sharing a single Timewand, as in a communal Timewand recording the check-out of corporate video tapes, then you want to make sure that each person scans their employee id and the video tape id, no matter how many tapes a person is checking out at once.
The reason for this stricter level of checking is to avoid the possibility of one person properly checking out a tape and then a second person "forgetting" to scan their id. The result of that "lack of security" is the first person gets the video tape "charged" to them.
The group hierarchy organization of data addresses this problem. it offers all the advantages and features of the hierarchy organization of data with the added requirement that each level of data must be scanned exactly once. In addition, there are "codes" that signal the end of the group and to cancel groups when they are partially scanned.
Getting Your Data Out
Of course, collecting data via bar code wouldn't be worth much if you couldn't get it into your main computer system. That task is performed by the Timewand's charger/downloader. The charger/downloader is self powered and connects to any PC via a RS-232 connector.
Software, sold separately, allows IBM PCs and compatibles, Apple II, Macintosh, or Tandy TRS-80 computers to download the Timewand's programs and upload the collected data. When ordering your timewand, you will need to specify which of the 11 different connecting cables you want. The connector on the charger/downloader is a RJ-11 telephone modular jack. The manual also specifies the pin connections should you want to build you own cables. However, be careful NOT to connect the charger/downloader directly to a phone line, you will damage your unit.
On an IBM PC, the main communications program is WDMAIN. It allows you to create a database for different timewands. Each record contains the particular timewand program you want for that timewand as well as other set-up information. WDMAIN is also used to initialize your Timewand and to upload the data after you have collected it.
WDMAIN is menu driven and reasonably straightforward to operate. However, it occasionally uses numeric codes such as 0 or 1 where answers such as Yes or No would be more natural.
WDMAIN's main menu contains options to create/modify the database of timewands that will be used with this recharger/downloading workstation, initialize one or more Timewands, upload their data, maintain a database of telephone numbers for remote Timewands accessed by modem, access those remote Timewands, look at a raw or processed data file and tell WDMAIN's built-in data conversion program the format you want the final output file to be in.
One interesting feature of WDMAIN is its ability to support remote Timewand's though modem connections. This can even be done on a scheduled basis during the night when telephone rates are the lowest. Because most modems are Hayes "AT" command compatible, the examples are all oriented towards those modems. By selecting the "TelCall" option, you can poll the remote Timewands after you have left for the day.
Thus, in our sales reporting application, we are able to put single station recharger/downloading stations connected to external modems in our offices in Salt Lake City and Albuquerque and have WDMAIN call them each evening to collect that day's sales information.
You can also use the stand alone DOS executable programs, TELCALL, TELEND, and DLOAD to integrate remote data collection into DOS based DataFlex programs (using RUNPROGRAM WAIT) without using WDMAIN.
What The Data Looks Like
The Timewand's data, when directly uploaded into a computer, looks a lot like a simple memory dump. That's because at the lowest level, the Timewand communicates by simply transfering its memory to the host for further processing and decoding. In reality, WDMAIN and DLOAD perform a large amount of preprocessing before the data is written to disk.
Assuming you are using the DLOAD or WDMAIN programs to retrieve data from the Timewands, the lowest level of data available is what Videx calls the raw data file. An example of that file format is show in figure 4.
The raw data file format consists of a header, one or more data lines, and a trailer. The header line starts with a capital H, and contains the date and time the scan file was downloaded, the source code of the data(currently always 0), and the identification number of the Timewand that generated the data.
The data lines each contain the date and time the data was scanned, again the source code of the data (0 is a bar code, 1 is the bar code keypad), and finally the data scanned.
Finally, a trailer line, starting with the capital letter T contains a 3 digit completion code. That code indicates no errors, bad data received from the Timewand (but not which data is bad), a timeout in communications, or a disk error.
Assuming the data transfer is successful, WDMAIN will then convert the raw data file into a more human readable form. The default format is shown in figure 5. In that format, the date, time, source, and data are split apart and formatted so you can either read or input that data into another program. Note that some of the information available in the raw data file format are "lost" is the converted file, namely the identification number of the Timewand, the seconds the data was scanned, and the date/time the data was downloaded.
However, you can reconfigure WDMAIN (or, in the stand alone environment, CONVERT), to output whatever available data you desire. The possible output fields are shown in figure 6. Thus, in a building maintenance example where there can be three levels of data (employee, locations, and items) I can program WDMAIN (or CONVERT) to create an output file with the date, time, and each of the three levels of data on every record line.
An example of the output of the formatted file for this three level data is shown in figure 7. Note, interestingly, that the conversion has included each intermediate level of the data file with the unknown levels blank. When I asked Videx why, they indicated that some application developers had requested this intermediate data and that it was easy enough to filter out the unwanted data lines when reading the file.
Sure enough, one only has to look for a blank value in the last field to determine if all the line being read contains all the values to be legal. An example segment of DataFlex code is shown in figure 8 that will read the output file in figure 7 and store it in a DataFlex datafile for further processing.
Professional Documentation
The documentation for the Timewand is cleanly laid out and well written. The writers at Videx have taken advantage of the Mac's desktop publishing capabilities to create more a readable and professional manual. The manual has a table of contents, index and glossary. There are also references to sources of bar codes and where to look for more information on bar coding.
I did find the manual lacked a certain level of depth required to fully integrate the Timewand's data collection capabilities with my DataFlex applications. The coverage of the hierarchy and group data collection modes was barely adequate and the answers to many of my questions were obtained by experimenting with the Timewand and looking at the results.
There are also several supplemental documents available for more advanced users. They are not included with the manual but are available free upon request. Unfortunately, you must know they exist to ask for them, there is no reference to them in the manual or any of Videx's literature. I found out about them when talking to their technical support people.
One of the supplemental documents a program called DLOAD which is a command line driven equivalent to many of WDMAIN's functions. This program makes it possible to integrate the Timewand's uploading and downloading into DataFlex applications using the RUN PROGRAM WAIT command to call DLOAD. In that way, the Timewand can be made a seamless part of many DataFlex applications.
If you are more adventurous, and want an even higher level of integration with DataFlex, a second supplemental document outlines how to directly upload and download a Timewand from any computer that offers two way serial communications. This option might be necessary for DataFlex applications that are going to run on VAX/VMS and/or UNIX computers where Videx doesn't offer pre-programmed communications support. Communicating on this level is relatively straightforward. The downloading capability is very much similar to using a debugging monitor to load sections of code in the standard Intel Hex format. Similarly, uploading the bar code scan data is basically like a memory dump which then must be decoded.
Another, newly introduced, alternative to the lowest level of communication is the Smart Recharger. It is a stand alone microcomputer, programmed in Basic, that is integrated with a recharger/downloading station. Therefore in a VAX/VMS or UNIX environment you could program the Smart Recharger to download the Timewand's data, reformat it, log onto the mainframe and transfer the data to a file for later processing.
Limitations
No product is perfect, but rather an engineered set of trade-offs. The Videx Timewand is not any different.
The use of an infra-red scanner limits the use of the Timewand with some barcodes produced by thermal, ink-jet, and dot matrix printers. That's because those print technologies generally don't have enough carbon in the ink for the infra-red scanner to see. This limits the application of Timewands to those cases where you produce the barcodes or can control the specifications of the bar codes. While a visible light version of the Timewand might be possible, I doubt it would be as cost effective.
The way the Timewand stores the time and date stamp internally also places two limits on its application. The time/date is stored as a 16 bit integer.
First, the resolution of the stored time is only 16 seconds. Thus it is possible to scan several different bar codes and have them all have the same time and date stamp.
Second, the time/date is stored as the number of 16 second time ticks since the Timewand was last downloaded. Therefore, you must upload your data every 6 days or the time/date stamp "wraps around" giving you incorrect dates and times.
However, the date and time of the last download is also stored in the Timewand making it possible to download the Timewand from one workstation and upload it to another without losing track of the date.
Finally, in one application we actually found the Timewand's size to be a disadvantage. In considering the Timewand as a data collection device for my next door neighbor's labor job costing application, we concluded the employees at his print shop might lose or damage the Timewands. In talking with the people at Videx, there are two manufacturer's of cases that allow the Timewand to be attached to a lanyard and still allow scanning bar codes. This might solve our problems with potential loss and/or damage.
A Real World Application
We are in the process of prototyping a sales management application of the Timewand. Each of our salesmen calls on several of our 400 customers each day. Currently, they write or type a call report on each one. Back at the office, some of that information is abstracted and entered into a database. Thus we can query who has called on a particular customer within the last year.
However, the process of writing the call reports takes each salesman about two to three hours a week. Another four to five hours a week are spent putting this information into the computer. Our goal was to eliminate this duplication of effort, freeing our salesmen and inside people for more productive tasks. In addition, we are collecting far more information that we previously had.
To simplify this process, we took a report we produce for our salesmen that lists a particular customer's purchases from each of the factories we represent and added a bar code containing our internal customer number. A sample of the modified report is shown in figure 7.
Now when the salesman goes to visit a customer, he reviews the information on the report and scans the bar code with his Timewand. Then, returning to his car after making the sales call, he scans a bar code menu we have prepared that lists each factory and several potential activities such as product presentations, defective material handling, getting an order, etc. The current bar code menu we are using is shown in figure 8.
We now not only know who called on which customer when without any effort on the part of the salesman or the inside office staff, but we also have a large number of additional useful data that aid our sales management team.
For instance, by looking at the time when the salesman scans the customer number and the time when the first activity is scanned, we can determine how long each sales call is and how much time each day is lost to travel time.
As a result we have been able to demonstrate to our sales force the effect of carefully planning each day to minimize the amount of traveling they do. Before, it seemed as if they employed random "brownian motion" in their sales calls, making one call on one side of town and the next on the other side of town. Our salesmen now are more productive and spend less on auto expenses.
We also are able to analyze our coverage of each customer relative to the several factories we represent. Early on we recognized each of our salesmen has certain specialties and preferences. Thus one might prefer the more technical products while another may be the master of knowing exactly what price we need to be competitive on commodity products.
With the information we are now collecting, we can point out to each salesman what products they aren't pushing hard enough. And, since we also utilize a system of rotation of several salesmen through each customer, we can better schedule that rotation to balance the coverage of all our product lines.
A Unique Data Collection Device
The Videx Timewand is a cleverly engineered integrated bar code reader and data collection device in a pocket sized package. If you are looking for portability in an off-line data collection environment, I highly recommend the Videx Timewand.
In my next article in this series, I will be looking at the simplest "real-time" bar code reader solution, the wedge reader. These units connect between the keyboard and the computer. From your DataFlex application's point of view, the bar codes they read look like keystrokes being typed by the operator.
Where to Get You Videx Timewand
An interesting side effect of the articles I write are the calls I get wanting to purchase the product. I only write about the products, I don't sell them. I am willing to answer any questions you might have.
8K memory Timewand $248.00
16K memory Timewand $298.00
Single Recharger/Downloader $120.00
Multi-Recharger Control $140.00
Multi-Recharger Add-on $ 50.00
Smart Recharger $400.00
IBM PC Communications Software $299.00
Videx Inc.
1105 N.E. Circle Blvd.
Corvallis, OR 97330
(503) 758-0521
Figure 2
Timewand Downloadable Programs
There are 20 downloadable programs supplied with the Timewand I reviewed. They range from the "standard", simplified code 39 reader, to ones that support two, or even three, different bar code topologies and/or group/hierarchical data checking. Plus there are downloadable programs that support the hierarchical and group functions of the Timewand. Each option takes from 0 to 1024 bytes of the Timewand's data memory, reducing the amount of data storage.
STANDARD Code 39 only
KEYPAD Code 39 + keypad
LONGKYPD Long beep version of KEYPAD
BIDRKYPD Bi-directional code 39 + keypad
C39BIDIR Bi-directional code 39 only
HRCYKYPD Hierarchy checking, code 39 + keypad
NEWSTD Improved reading STANDARD
NEWBDKP Improved reading KEYPAD
BDKPHOLD Long LED version of NEWBDKP
NEWHRCY Improved reading HRCYKYPD
NEWGROUP Group structured version of NEWHRCY
CODEI25 Interleave 2 of 5 only, configured for 1 length
DUALI25 Interleave 2 of 5 only, configured for 2 lengths
I25C39KP Interleave 2 of 5, Code 39 + keypad
CODABAR Codabar only
UPCAE UPC, Code 39 + keypad
EAN EAN, Code 39 + keypad
HBCYHOLD Long LED version of HRCYKYPD
QUICKDMP Code 39 + automatic "dump"
QUICKEAN EAN + QUICKDMP
QUICKBKH BDKPHOLD + QUICKDMP
Figure 4
Example Timewand Raw Data File Format
H 19800102001653 00 0000013410
19800103001512 00 15389
19800103001512 00 28773
19800103001512 00 38773
19800103001528 00 27860
19800103001528 00 37860
19800103001528 00 39576
19800103001528 00 18374
19800103001528 00 29576
19800103001528 00 38773
19800103001544 00 14357
19800103001544 00 14357
19800103001544 00 27860
19800103001544 00 37860
T 000
Figure 5
Example Default Converted Data File Format
1980010300150015389
1980010300150028773
1980010300150038773
1980010300150027860
1980010300150037860
1980010300150039576
1980010300150018374
1980010300150029576
1980010300150038773
1980010300150014357
1980010300150014357
1980010300150027860
1980010300150037860
Figure 6
Data File Conversion Output Options
BARCODE Bar code data itself
LV01 to If hierarchy or group data collection the bar code
LV16 data at level 1 through 16. Note partially
completed levels are also output.
TIME Time/date stamp of current bar code (several
different styles available)
STOP Time/date stamp of next bar code at same or higher
level (useful in job costing, etc.)
DOWNLOAD Time/date stamp of when Timewand was downloaded
IDENTITY Identity of Timewand from which barcode data came
ORIGIN Origin of bar code data
0 if bar code scan
1 if bar code keypad
Date/Time Formatting Options Examples
1 02/10/88
2 Mon, Feb 10, 1988
3 Monday, February 10, 1988
4 02/10/88 10:54 AM
5 02/10/88 10:54 (24 hour military time)
6 10:54 AM (time only)
7 1054 (24 hour time only)
8 Feb 10 88
9 19880210105424
10 19880210
11 654 (minutes from midnight)
12 32183 (days from 1/1/1900)
13 1 (day of the week)
14 Monday (day of the week)
15 10 (day of the month)
16 10 (hour of the day, 0-23)
17 54 (minute of the hour)
Figure 7
Example Hierarchical Data File Format
10/15/88,0920,15389, ,
10/15/88,0920,15389,28773,
10/15/88,0920,15389,28773,38773
10/15/88,0920,15389,27860,
10/15/88,0920,15389,27860,37860
10/15/88,0920,15389,27860,39576
10/15/88,0920,18374, ,
10/15/88,0920,18374,29576,
10/15/88,0920,18374,29576,38773
10/15/88,0920,14357, ,
10/15/88,0920,14357, ,
10/15/88,0920,14357,27860,
10/15/88,0920,14357,27860,37860
Figure 8
Sample DataFlex Program Segment to Read Hierarchical Data
/*
// MINIMAL PROGRAM TO READ FORMATTED DATA FILE INTO DATAFLEX DATABASE
OPEN TIMEWAND
DIRECT_INPUT "DATA.FMT"
[SEQEOF] ABORT // DO NOTHING IF FILE EMPTY OR NON-EXISTANT
REPEAT
CLEAR TIMEWAND
READLN TIMEWAND.DATE TIMEWAND.TIME TIMEWAND.PERSON TIMEWAND.LOCATION TIMEWAND.ITEM
// THE DATA FILE INCLUDES RECORDS FOR EVERY SCAN, ONLY THOSE WITH ALL THREE
// DATA POINTS (PERSON, LOCATION, AND ITEM) ARE VALID. REST ARE INCOMPLETE
// ONLY KEEP RECORDS THAT HAVE ALL THREE DATA POINTS
[NOT SEQEOF] IF TIMEWAND.ITEM NE " " SAVE TIMEWAND
UNTIL [SEQEOF]
ABORT
Figure 9
File Definition for Sample DataFlex Program
FILE DEFINITION LISTING FOR FILE #6
***************************************************
FILE ROOT NAME = TIMEWAND
USER DISPLAY NAME = TIMEWAND
DATAFLEX FILE NAME = TIMEWAND
***************************************************
RECORD LENGTH = 128 (USED = 22)
MAX NUMBER OF RECORDS = 50 (USED = 5)
DELETED SPACE IS RE-USED
MULTI-USER RE-READ ACTIVE
***************************************************
FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO
NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD
----- ------ ----- ----- --- ----- ---- -----
1 1 3 DATE 1 0 0 DATE
2 4 4 ASCII 1 0 0 TIME
3 8 5 ASCII 0 0 0 PERSON
4 13 5 ASCII 0 0 0 LOCATION
5 18 5 ASCII 0 0 0 ITEM
INDEX 1: FIELD SEGMENTS: <1> <2> <0>