dbcopy - Database Copy - Database Copy

dbcopy [-cdEpfiRt] [-S srcdir] [-D destdir] sourcedataarea destinationdataarea [filename|systemcode ...]

dbcopy -7[-cdEpfiRt] sourcedataarea destinationdataarea sourcelibrary [filename|systemcode ...]

dbcopy -V

The dbcopy command is used to copy data from one data area to another data area. By default, the data in all the files is copied. If only the files in a system code or specific files should be copied, list them in the command. The files copied must be in both dictionaries and, unless the -c option is specified, they must have the same structure (the database columns are the same).

Program Option Description
c Convert data where the two files do not exactly match. Columns in both files are copied and columns only in the destination file are set to the default value. If the files are the same, no conversion is done.
d Delete the file and indexes from the destination data area database (if they exist), create the file in the database, copy the data, and then create the indexes before copying.
E Exclude IsView objects in the destination.
p Precreate indexes before copying. Only use with -d.
f Fix records, if needed, while copying.
i Ignore errors while copying.
R Reject records with bad keys while copying.
t Truncate the file in the destination data area database prior to copying the data.
S Read source data from files in the srcdir directory.
D Write destination data to files in the destdir directory.
7 Copy from a 7.x Lawson Environment on IBM i. The IBM i library containing the file(s) to copy is sourcelibrary.
V Prints the version of dbcopy.

At the Qshell command line, specify the information above.

or

  1. In a Lawson Interface Desktop (LID) session, use Form Transfer (F8).

  2. On Form Transfer, specify dbcopy in the Form ID field. Click OK or press Enter.