sanjayr321 Beginner
Joined: 25 Sep 2006 Posts: 28 Topics: 15
|
Posted: Wed Sep 27, 2006 9:23 am Post subject: Match b/w two WS-Tables |
|
|
Hai all,
I want to match the values b/w two ws-tables, it may be subscript or index tables.
01 WS-TABLE
02 Table occurs 10 times
03 customer no-1 pic x(9)
03 account no-1 pic 9(5)
03 account name-1 pic x(6)
01 WS-TABLE2
02 Table2 occurs 10 times
03 customer no-2 pic x(9)
03 account no-2 pic 9(9)
03 account name-2 pic x(6)
Now i want to find the match b/w two tables on account number, consider WS-TABLE1 having account number 00001, 00002, 00003, 00004, 00005 along with other fields and WS-TABLE2 having account number 00001, 00003, 00004, 00006 along with other fields like customer no-2, account name-2
Match the two tables on following conditions
a) If all account numbers on WS-TABLE1 = all the account numbers on WS-TABLE2 then write to file1
b) If one of the account number on WS-TABLE1 is not match with any of the account numbers on WS-TABLE2 then write to file2
c) IF one of account number on WS-TABLE2 is not match with any of the account number on WS-TABLE1 then write to file3
Note:
The number of records on both tables may not be equal i.e WS-TABLE1 may contain 5 records and WS-TABLE2 will contain 4 records.
Please provide some suggestion to write code for these requirments.
Thanks in advance. |
|