Analyzer automatically detects and analyzes dBASE files, typically those with a *.dbf extension, from a personal computer and creates a format for them. This is also true for dBASE files created by Xbase (dBASE compatible) products like FoxPro™.
Note: Analyzer reads dBASE data files, but does not read any other files associated with them, such as index or memo files.
When you select a dBASE file to define in the Data Definition Wizard, Analyzer automatically detects and defines the fields.
Most dBASE field types, including those recently added by Visual FoxPro, are supported by Analyzer, which automatically generates a field of the appropriate type. These include:
|
dBASE Field Types |
Analyzer Field Types |
|
Character |
ASCII |
|
Numeric |
NUMERIC |
|
Date |
DATE |
|
Logical |
LOGICAL |
|
Float |
NUMERIC |
|
Currency |
MICRO |
|
Integer |
MICRO |
|
Double |
FLOAT |
Visual FoxPro NULL-valued fields are treated as blanks or zeroes by Analyzer.
dBASE field types not supported by Analyzer include Memo and General fields, as well as dBASE’s proprietary DateTime fields. However, you can still access the information in DateTime fields if required by manually defining it.
To manually define a dBASE DateTime field, you must understand that they are always stored as an eight bytes long field. To locate the field, look for the corresponding gap of this size in the field definition. Internally, this field type is made up of two, four-byte MICRO fields; the first of which represents the date and the second of which represents the time. To manually define a dBASE DateTime field in the Data Fields window, start by defining the two, four-byte portions as separate micro fields with zero decimals and name them Date and Time.
The date portion is actually stored as a number of days. This date format differs from Analyzer’s date format by exactly 2,415,020 days. Therefore, to treat the date properly in Analyzer, you need to create an expression of the form:
`19000101`+DATE-2415020
and give it a name for future reference. See also Serial Dates.
The time portion is stored as thousandths of a second since midnight. You can determine the hour of the day to two decimal places by dividing the contents of the time field by 3,600,000.00. For example, 7.50 is 7:30 AM and 14.97 is almost 3 PM.
To determine exact hours, minutes and seconds, use the INTEGER() function:
Hours:
INT(TIME/3600000.0000)
Minutes:
INT(MOD(TIME,3600000)/60000)
Seconds:
INT(MOD(TIME,60000)/1000)
If a data file uses a non standard delimiter, Analyzer may not be able to detect the file as a delimited file. In this case, click the Delimited text file radio button in the Data Definition Wizard’s File Format panel. Then click [Next] to advance to the File Properties panel where you can specify a non-standard delimiter. This allows you to define and use virtually any delimited file no matter what characters are used as a delimiter.