Try OpenEdge Now
skip to main content
ProDataSets
Advanced Events and Attributes : Successive loading of ProDataSet data : COPY-DATASET and COPY-TEMP-TABLE methods : Pairs-list argument
 
Pairs-list argument
The pairs-list argument only applies to COPY-DATASET. The pairs-list is a comma-separated list of target and source tables to be copied, such as: targetT1,sourceT1,targetT2,sourceT2. If the pairs-list is present, the copy is done between only those member tables given in the pairs-list, by matching target and source table names. If the pairs-list is not given, the tables are copied in the order in which they were defined or added in the two ProDataSets.
If one ProDataSet has more tables than the other, the extra unpaired tables are ignored. In other words, you can use COPY-DATASET without the pairs-list option to copy one ProDataSet to another, even when one ProDataSet has more tables than the other, as long as the tables to be copied have the same relative positions within the ProDataSet structure. This is the same as the order in which the tables would be returned by the GET-BUFFER-HANDLE(i) method.
If the tables to be copied are not in the same relative order, then you must specify the pairs-list option to tell the AVM which source tables go with which targets. If the source and target tables do not match up in their relative order within their respective ProDataSets, you must specify the pairs-list even if the table names are the same.
For example, given a source ProDataSet with temp-tables T1, T2, and T3, and a target ProDataSet with just tables T1 and T3, you must define the pairs-list option to be T1,T1,T3,T3, because the relative position of T3 in the two ProDataSets is not the same, even though the table names are the same.
It is also worth noting that for static temp-table definitions, it is not possible for the source and target temp-tables to have the same name anyway, since each static name defines a single unique instance with that name.