|
Changes file
|
Top Previous Next |
|
Now the program knows which fields you want in your IMW database from the lookup (.LUS/.LUC) file. It also knows where the data for those fields can be found in the delimited file from the import definition (.IMP or .IML) file. The program now needs to know what to do with the any text in the database that it finds during importing. This is described in the changes definition (.CNG) file. The base fields have pre-determined formats, along with valid ranges for the data in them. The following are the formats and ranges for each of the base fields:
The user-defined fields are all represented numerically and have valid ranges of 0 - 255. The user will always see user-data as text, but internally it is stored as a number. This is the secret to IM's high speed processing and compact database size. This also means that any non-numeric, user-defined data must be assigned numeric values during the import process. This conversion is handled by the convert definition file. Its job is to change characters to numbers at import.
If your database uses numbers in all of its data fields, then the conversion file will need no editing. In this case, the convert file will have only a title in it, no conversion values. If on the other hand, your database uses characters in its data fields, you must provide a conversion from each character to a unique number. If this is the case, the changes definition (.CNG) file must be edited. This file is an ASCII text file and can be edited in any text editor or word processor. Intersection Magic's editor may also be used for this purpose. The format of this file is straight-forward:
• Each line in the file represents one conversion specification. • Each line contains three values separated by spaces. • The first value is the name of the field which MAY need converting. • The second value is the number to convert to. • The third value is the text to convert from.
A couple of typical lines might look like this:
TYPECOLLISION 1 HO TYPECOLLISION 2 SS TYPECOLLISION 3 RE TYPECOLLISION 4 OTHER 1 TYPECOLLISION 5 OTHER 2
It would be likely that the following table exists in the lookup file:
TYPECOLLISION 1 Head on 2 Side swipe 3 Rear end 4 Other single veh 5 Other multi veh
What the conversion file above says is the following: 'If, while importing data into the TYPE COLLISION field, the values 'HO', 'SS', 'RE', 'OTHER 1', 'OTHER 2' are found in the field designated by the Import definition, import the values 1, 2, 3, 4, 5 respectively.
The number of conversions is almost unlimited. Therefore every field may be converted if need be. However, the larger the conversion file the longer time for importing. The next section defines another way to create your changes file by using the CGFAIL.LOG file. When this file is finished, all of the files required to import data have been defined.
More:
|