Skip to content

Structure_Copy

Purpose

Copies the structure of one file to another.

Syntax

Structure_copy
    from_file_num
    to
    to_file_num

Argument Explanation

  • from_file_num: Number of the file which will have its structure copied (the source file).
  • to_file_num: Number of the file to which the structure is to be copied (destination file).

What It Does

This command is similar to load_def. They both copy an existing file structure onto a new one. Structure_copy uses an open database file as the source, while load_def uses a definition (.DEF) file as the source.

Notes

  • If the destination file is an existing file, any existing fields or indexes in the destination file will be deleted before the copy takes place.

  • This command must be used once after every structure_start. Note that it is the destination file that will be the argument to the structure_start command.

  • This command only copies the structure, not existing records.