Dbase
This article is aimed at individuals who have large data files in the older Dbase format (dBase 3, dBase 4, dBase 5, etc.) and who are not using date arithmetic in their database programs, for example, those who use a simple home checkbook file or a household inventory and who would probably not need to calculate the time between included dates.
After a little experimenting, I conclude that the following steps would make most such programs useable in the year 2000. The following three (or in some cases four) steps would suffice in changing your files to a format which would show the new four digit years:
First, revise the field format for files that use the "date" structure-this is a fixed, eight-digit field to which six digits are entered. For each file you wish to change, load ("use") the file and type "modify structure." Go to the date field and change the type to "character" and the field length to 10. Hit Enter until you pass the last field. Then hit the Enter key once. The file will be copied with the existing date, filling all but two spaces of the changed date field.
|
Second, prepare a simple program like the one shown in Figure 1.
Third, load ("use") the file you wish to update and run the program you have written to create the four-digit years.
It's so fast you won't even realize it's done. If you enter data via formatted input screens, here is a fourth step:
Modify the input screens by changing the date field to 10 digits of character information. You can get really fancy, if you want, and write a loop while insert the slant signs in the dates as 01/15/1999. Or you can begin entering dates with the full 10 characters (including the slant signs).
Figure 2 and Figure 3 show a sample database printout before and after making the changes.
For an addendum to this article by Tom Anderson, click here.
|