Compare provides a powerful facility for comparing two sets of related data. This topic details the steps used to perform the Compare Process.
To compare data from IMS™, VSAM or sequential files, you must create Table Definitions. For IMS data, see Defining a Table for IMS Data and for VSAM or sequential data, see Defining a table for VSAM or Sequential File Data.
You can also define a match key that you can use with the current Compare Process or save in the Compare Definition. For a single table comparison, use the Specify COMPARE Sources panel to indicate a user-defined match key will be used. For a multiple table comparison, use the MKEY command in the COMPARE Process Table Map to indicate the tables that will use a user-defined match key. After completing each panel, you will be prompted to define the match key.
The columns in a match key can correspond directly by name and compatible attributes (for example, CUST_ID in both tables) or the correspondence can be established using a Column Map. (When a Column Map is used, the names may be different but the attributes must be compatible.)
Command ===>
User defined I/O Exit ===> Row 1 of 5
Cmd Level/Field Name Type Len Occur Column Name
--- ------------------------------ --- ----- ----- ----------------------------
*** ********************************** TOP ************************************
___ 1 POLICY 70 POLICY
___ 5 POLICY-ID CHR 2 POLICY_ID
___ 5 POLICY-INFO 17 4 POLICY_INFO
___ 10 POLICY-NAME CHR 8 POLICY_NAME
___ 10 POLICY-RATE CHR 3 3 POLICY_RATE
*** ******************************** BOTTOM ***********************************
When you use this table in a comparison and display the results, the column headings will appear as shown in the following example:
------------------- Optim: Browse (Source 1 Names Shown) ----------------------
Command ===>
SUBSYS: DD9F
Cmd Chg Src == Table: TESTNEST(T1) =================================================
POLICY_ID POLICY_NAME_1 POLICY_RATE_1_1 POLICY_RATE_2_1 POLICY_RATE_3_1
--CH(2)-- ---CH(8)----- -----CH(3)----- -----CH(3)----- -----CH(3)-----
*** ********************************************************************************
___ 12 01 POLICY A 100 200 300
*** ********************************************************************************
In the example, the column heading displayed as POLICY_RATE_2_1 is for the column defined in the Legacy Table as POLICY_RATE, which is the second element of the first table dimension.
You can use the generated column name with functions that accept a column name as input, such as FIND or LOCK.