Specifying Column Ordering

After table pairs have been selected, column ordering information must be specified. This information is used to help ensure that the data comparisons are between corresponding rows in each table. Column ordering is initiated on the Data Compare Explode Services panel. The following precautions help ensure that the Data Compare facility is comparing the correct rows and columns.
carcudb2
After table pairs have been selected, column ordering information must be specified. This information is used to help ensure that the data comparisons are between corresponding rows in each table. Column ordering is initiated on the Data Compare Explode Services panel. The following precautions help ensure that the Data Compare facility is comparing the correct rows and columns.
  • Use the same ordering strategy for the source and target columns. In other words, if the source table is ordered by column 1, then the target table should be ordered by the column that is mapped to source column 1.
  • Use a unique ordering strategy if possible. Otherwise, the compare routine might get out of sync when comparing rows.
Data Query Edit Screen
The Data Query Edit screen allows specification of the column order of a table. This affects the sorting when the table unload is performed, which affects the order of the comparisons, which in turn affects the comparison results
To display the Data Query Edit screen from the Data Compare Explode Services panel, first enter
Y
in the one-character part of the Where field for the table to be ordered. Then leave the eight-character part of the Where field blank and press Enter. The Data Query Edit screen appears with a Query Name of Temp.
In the ORD field, enter the order for the table. Use the scrolling keys F7 (Up) and F8 (Down) to display more columns. In the previous example, column 2 is first, column 3 is second, and column 4 is third. When the ordering specification has been completed, press F3. A (for ascending) is inserted after the numbers entered in the ORD field and you are returned to the Data Compare Explode Services panel. The appropriate ORDER BY statement specified by column ordering appears on the data Compare Unload Specification screen when the unload control statements are generated (see Generating Unload Control Statements).
To view or change the column sort order for the other table in the pair, use the Where field to display the Data Query Edit screen again, and change the order as described previously. In general, if a data query is used for one table, it should be used for both tables to guarantee compatible sort order during the table unload.
After column ordering has been specified and the number of rows to be compared has been limited (optional), the table columns can be mapped.