File_Size
Obsolete
Use the DF_FILE_RECORDS_USED, DF_FILE_MAX_RECORDS, and DF_FILE_NUMBER_FIELDS attributes instead of this command.
Purpose
- To retrieve the current number of records, maximum number of records, and the defined number of fields for a database file.
- To change the maximum number of records allowed in a database file.
Syntax
File_Size df_filename to current_size {maximum_size} {field_count}
or
File_Size new_max_size to df_filename
What It Does
Format 1
File_Size places the number of records in df_filename into the variable first named after the to in the command. It places the maximum allowable number of records into the second variable (if passed) and the number of fields in the definition of the file into the third variable (if passed).
Example
File_Size parts to num_parts max_parts parts_fields
This example moves the number of records currently in the database file parts to the variable num_parts, the maximum defined size of parts to max_parts, and the number of fields in the definition of parts to parts_fields.
Format 2
File_Size changes the number of records that will be allowed in df_filename.
Example
File_Size 2500 to customer
This example gives the database file customer a new maximum of 2500 records.
Notes
- Database files addressed by the
File_Sizecommand must be open at the time the command is issued. - A
File_Sizecommand addressed to a nonexistent file will generate a runtime error. - If you change the maximum number of records of a file that has indexes, you must update its indexes before you can update online or find by the indexes. Indexes can be updated from Database Builder or by using the sort command.