The File Structure |
Top Previous Next |
Once a file has been opened, the actual structure ( see the discussion on Understanding Data Files ) can be modified, either adding or removing fields.
It is never a good idea to modify the structure of the file that is used by your main program. Instead, you should always use a copy of the file.
Why modify the file structure ? Sometimes, when experimenting with data, it is helpful to limit the number of items ( fields ) that are being tracked. For this reason, you may wish to remove fields. In other cases, you may wish to add data to a file to do comparisons. So, you could add a new field, and then use the global replace command to insert the new data.
The structure controls The controls on the main file browse window will perform the file modification process as detailed below.
Add new fields to the list When selecting this button, a pop up window provides you with a blank for the field name, a list of possible field types, the total length of the field, and the number of places to the right of the decimal ( for numeric fields ). Simply type in a name, select the type, specify the size and decimals, and then select the Add the Field and Continue button.
Modify data file field names This option displays a window with two columns. The left side displays the current name. To modify the name, simply type the new name(s) in the right column, and select the Make New Field Names and Continue button.
Do not change any field names that were created by the original program. This would cause an error in the program's operations.
Modify data file field lengths This window will display the lengths and decimal values for all fields. Simply make any changes desired, and select the button titled Process Your Changes and Exit. This will update the file.
Remove the marked fields If you mark fields in the box on the lower left of the file browse window ( click the left mouse button to highlight the field, or press the Shift key with the left mouse button to highlight additional fields ), then select the button, those fields will be removed from the file. This is a great tool when working with a copy of the file, but should never be used with the real file. |