home *** CD-ROM | disk | FTP | other *** search
- ********************** Big COMMAND FILE ***************************
- *
- * This file starts with the records from Names.dbf, then builds itself up
- * to 100 records (Last_num). It copies the records to Big.dbf, then appends
- * records from Names.dbf, as needed. Experiment with the value of Last_num
- * to see how this works.
- *
- Last_num = 100
- *
- * You can include comments in a command file by using an asterisk followed
- * by a space, then your comments, just like these lines.
- *
- USE Names
- SET SAFETY OFF
- *
- * First GO BOTTOM to determine the size of Names.dbf. (This is the size
- * of the record set to be APPENDed FROM). Compute the number of entire
- * Names.dbf (loops) to be APPENDed. Compute: Whole sets (loops) =
- * Last_num / size of Names.dbf
- *
- GO BOTTOM
- loops = int(Last_num/RECNO())
- *
- * Now compute the number of single records needed (remainder) to equal
- * Last_num. Compute: Additional records (remainder) = Last_num - (loops times
- * the size of Names.dbf
- *
- remainder = Last_num - (loops * RECNO())
- *
- * First create Big.dbf with the extra single records needed
- *
- COPY TO Big all for RECNO() <= remainder
- *
- * Now APPEND in loops number of Names.dbf, decrementing loops each time
- *
- USE Big
- DO WHILE loops > 0
- APPEND FROM Names
- loops = loops - 1
- ENDDO
- *
- * After the work is done, display the structure of Big.dbf
- *
- CLEAR
- SET TALK OFF
- DISPLAY STRUCTURE
- CLEAR ALL
- SET TALK ON
- SET SAFETY ON
- *
- ? 'Due to space limitations on the disk, the number of records ì
- in'
- ? 'in the file Big.Dbf has been reduced from 250 to 100 records.'
- RETURN