Loose-copy-mode argument
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Loose-copy-mode argument
By default, pairs of source and target temp-tables
being copied by the COPY-DATASET or COPY-TEMP-TABLE method
must have compatible definitions. The loose-copy-mode option
overrides this default.
For the COPY-DATASET method,
if loose-copy-mode is true, the parameter applies
to each temp-table buffer in the ProDataSet. Thus, the remainder
of this paragraph applies to both the COPY-DATASET and COPY-TEMP-TABLE methods.
If loose-copy-mode is true for a temp-table buffer,
the AVM effectively performs a BUFFER-COPY from
source to target. BUFFER-COPY is more flexible
than the default behavior of COPY-TEMP-TABLE or COPY-DATASET because
it matches each source field by name to its corresponding field
in the target, and ignores fields that do not match, without error.
This is somewhat more expensive than the default behavior of COPY-DATASET and COPY-TEMP-TABLE,
which assumes compatible definitions field-for-field between source
and target. When loose-copy-mode is true, the
AVM checks for an existing field-mapping between the two buffers
specified in a previous ATTACH-DATA-SOURCE operation.
If the source temp-table is in fact the Data-Source for the target,
then its field-mapping is used to match up field pairs with differing
names, just as for BUFFER-COPY. If there is no ATTACH-DATA-SOURCE between
the two buffers, the copy is done by matching field names and only
copying those fields that appear in both source and target. As with BUFFER-COPY, different
field order and missing fields do not prevent the method from succeeding.
There is also no requirement that indexes on the two temp-tables
be identical.