View previous topic :: View next topic
|
Author |
Message |
to_sreeni
New User
Joined: 08 Jul 2009 Posts: 17 Location: bangalore
|
|
|
|
I have two input files as file 1 & file 2 (VB 496). I need to compare two fields(keys).
If File 1 keys matches with File 2 then write file 1 record to match file.
Unmatched file 1 records whould be written to unmatch file.
The keys are in hexa and character format.
The Keys are 8,1,CH; 9,3,Hexadecimal ; 20,5,CH
Input File 1
------------
é.P.ù.......JìC1A35 ..*...á...TOM....C.........D.........
450D0D2000000D5CFCFF440151034000EDD0000C000000000C000000000
01176D600000018311350097C1305000364000030000000004000000000
----------------------------------------------------------
é.P.ù.......JìC1A36 ..*...ß...TOM........................
450D0D2000000D5CFCFF440151035000EDD000000000000000100000000
01176D600000018311360097C1309000364000000000000003560000000
----------------------------------------------------------
é.P.ù.......JìC1A37 ..*...ß...TOM...............£ò.......
450D0D2000000D5CFCFF440151035000EDD0000000000000005C0000000
01176D600000018311370097C1309000364000000000000007BDC000000
----------------------------------------------------------
é.P.ù.......JìE1A05....*..&....TOM.....KITCHEN*MRS
450D0D2000000D5CFCFF000151051000EDD00000DCECCCD5DDE
01176D600000018511050097C13030003640000B2933855C492
----------------------------------------------------------
îxP..õ......JìC1A56 ..*.......TOM.....Õø........²-.......
45AD02C000000D5CFCFF440151011000EDD00000E700000000E60000000
067779F00000018311560097C150700036400000F000000000A00000000
Input File 2
------------
é.P.ù.......JìE1A05....*..&....TOM.....KITCHEN*MRS
450D0D2000000D5CFCFF000151051000EDD00000DCECCCD5DDE
01176D700000018511050097C13030003640000B2933855C492
--------------------------------------------------
Out file 1 (Match File)
-----------------------
é.P.ù.......JìE1A05....*..&....TOM.....KITCHEN*MRS
450D0D2000000D5CFCFF000151051000EDD00000DCECCCD5DDE
01176D700000018511050097C13030003640000B2933855C492
Out File 2 (Unmatch File 1)
---------------------------
é.P.ù.......JìC1A35 ..*...á...TOM....C.........D.........
450D0D2000000D5CFCFF440151034000EDD0000C000000000C000000000
01176D600000018311350097C1305000364000030000000004000000000
----------------------------------------------------------
é.P.ù.......JìC1A36 ..*...ß...TOM........................
450D0D2000000D5CFCFF440151035000EDD000000000000000100000000
01176D600000018311360097C1309000364000000000000003560000000
----------------------------------------------------------
é.P.ù.......JìC1A37 ..*...ß...TOM...............£ò.......
450D0D2000000D5CFCFF440151035000EDD0000000000000005C0000000
01176D600000018311370097C1309000364000000000000007BDC000000
----------------------------------------------------------
îxP..õ......JìC1A56 ..*.......TOM.....Õø........²-.......
45AD02C000000D5CFCFF440151011000EDD00000E700000000E60000000
067779F00000018311560097C150700036400000F000000000A00000000[/code]
Can you please give the solution for this? |
|
Back to top |
|
|
to_sreeni
New User
Joined: 08 Jul 2009 Posts: 17 Location: bangalore
|
|
|
|
Hi Anand,
Both these files are in the same format. the keys are also in the same position in these two files.
can you please provide the code for this.
Thanks,
Sreenivas |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Can input file1 have duplicates within it? Can input file2 have duplicates within it? If so, then please show a better example including duplicates in file1 and/or file2 as appropriate, and the expected output records. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Frank,
I've locked this topic as it is really a Syncsort question that is already in discussion.
ibmmainframes.com/viewtopic.php?p=199004&highlight=#199004
Sreenivas,
Do not double post. . .
As you were told in your other topic, the problem is the data, not the JOINKEYS.
You need to practice with using the "Code" tag. . . |
|
Back to top |
|
|
|