LA283 Section 2 dBASE III: Final Lecture April 9, 1996 1. Modifying the dBASE structure -->issue the command .use dbfname .modify structure A. Inserting a new field -cursor down to the field BELOW the desired placement - -input new field name, type, and width - B. Deleting a field -cursor to the field - C. Changing the width of the field -change the number Note: may lose data if the field width is decreased D. Changing the field type 2. Deleting records ---> from the active data base -browse -cursor to record - (this command marks the record for deletion) -exit to the dot prompt -type pack to permanently delete the record ---> delete all records (but retain the structure) -type zap at the dot prompt 3. Sorting and indexing -->sort: creates a separate data base (dbf extension) -->index: creates a pointer to the data base (ndx extension) A. Sort -sort on field to examples: sort on major to newmaj sort on major /A to newmaj sort on major, name to newmaj B. Index -index on major to ndx-name To use the ndx file: - .use dbfname - .set index to or - .use dbfname index Note: If the dbf is updated and the ndx file is not active, it must be reindexed to reflect changes in the dbf. - .use dbfname - .reindex