Syntax

stat = REPCOPY(tag1, tag2)

Arguments

stat: integer

tag1, tag2: database variable

Meaning

Copies all occurrences of tag1 to tag2. stat is 0 if the operation is successful, otherwise an applicable error code is returned.

If tag2 is part of a data dictionary field group, then all fields from that field group will be emptied before tag1 is copied. It doesn't matter whether tag1 is part of a data dictionary field group or not: only tag1 will be copied, not the other fields in the group (with REPCOPY you cannot specify a group field mapping).

Example

stat = repcopy (au,ca)
if (stat = 1) THEN errorm 'Copy successful'

Result

If the value of stat is 1, the message Copy successful will be displayed.