Previous Topic: COPY Control StatementNext Topic: DELBAN Control Statement


Syntax

COPY from-name reserve-option buffer-option history-option

where:

from-name

Specifies the high-level name of the database to be copied.

This operand is required.

reserve-option

Specifies either RESERVE, to place a reserve on the output database for the duration of the copy operation, or NORESERVE, to not place a reserve on the output database.

Specify NORESERVE only if you can be certain that no one else could be updating the output database while the COPY operation is in process.

If omitted, RESERVE is used by default.

buffer-option

Specifies either BUFFER, to buffer records written to the output database that improves performance and reduces input/output time, or NOBUFFER, to eliminate buffering.

If omitted, NOBUFFER is used by default.

Note: When using BUFFER, an unsuccessful completion could corrupt the output database.

history-option

Deletes detail history when you copy a database.

Specify either HISTDEL to delete the detail history subfile only, or HISTDELALL to delete the history subfile and all basic history records.

Note: When converting databases, if you specify a value for the BLKSIZE operand in the ADDDS control statement that is smaller than was originally specified for the "from" database, specify a value for history-option.