REPLACE

Restriction: This topic applies to Windows environments only.

Specifies that the data being exported is to replace the current contents of the destination file. The syntax is:

REPLACE = {Y | N};

If REPLACE is set to N (default), then if the destination file exists, the data is appended. If REPLACE is set to Y, then the data in the target file will be replaced.

If no file of the same name exists, the data in the table being exported will be placed in a newly created file regardless of the parameter specified with the REPLACE command. If the REPLACE command is not included, and the destination file already exists, the data is appended to the file.

This statement is supported for the following formats:

With all other formats, the file is replaced instead of being appended to regardless of how REPLACE is set.

For example:

REPLACE = Y;

will cause the exported file to overwrite any existing file with the same name.