I need to prduce an o/p file with one ot one match.The o/p file should look like
Code:
AAAAAA ZZZZZZZ
CCCCCC DDDDDDD
1)There are 2 records(AAAA..) in file-1 and 1 record in file-2,so I need to eliminate 1 record from the i/p file.
2)There are 2 records (BBBB..) in both the files,So I need to eliminate all the records.
3)There is no record (CCCCC..) in the file 2 ,So I need to retain the record in the o/p file.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Fri Jan 20, 2006 2:30 am Post subject:
Kolusu,
From what I understoold from bprasanna's note, he wants to reject all matched ones and pick-up only the un-matched / extra records. I would prefer to check if the summed sequence number is ODD instead of saying (81,8,ZD,LE,3). Still, it doesnot satisfy all test cases. (I hope, this is what u meant by this "With Some Assumptions")
bprasanna,
It would be better if you can provide a more detailed list of test cases so that we can provide a accurate solution. (currently, we are forced to guess lots of things).
Question 1:
What if you have 3 records with same key in file 1 but there are no occurences in file 2 ? Do you want to write 3 output records or only 1 record ?
Question 2:
What are the maximum occurances possible for a key in each of your input files.
Question 3:
You have shown 2 fields in your input datasets. Both have the same value in your sample data. Is this always true ? Do you want us to match only on the first field (AAAAA, BBBBB, CCCCC ????) or would u like to match on the second field also ?
Hi,
Thank you for the replies.I am out of town for few days.
Here is my requirement. I am getting a file with data like bank user ,account number , trans-type, reveresed and amount.
The fileds reversed is going to have either Y or 'N'.Here is the test file that look like.
Code:
USER A/C no Trans-type Reversed Amt
==== ====== ========== ======== =====
01 12345 KF N 10.01
01 12345 KF Y 10.01
01 12345 KF N 10.01
01 12345 KF N 20.00
01 12346 KF N 20.00
01 12347 KF N 24.00
01 12347 KF Y 24.00
01 12347 KF N 24.00
01 12347 KF N 24.00
01 12348 KF Y 21.00
I need to generate the o/p with eliminating the paired transactions(Ie..if an a/c number is having the same trans typ for same amount with 'y' and 'n' then I need to remove it from the list).
Code:
USER A/C no Trans-type Reversed Amt
==== ====== ========== ======== =====
01 12345 KF N 10.01
01 12345 KF N 20.00
01 12346 KF N 20.00
01 12347 KF N 24.00
01 12347 KF N 24.00
01 12348 KF Y 21.00
I have given 2 files in my post becuase ,I have splitted the file in to 2 files with trans 'y' one and 'N' one.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum