IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

compare two files which has hexadecimal key


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
to_sreeni

New User


Joined: 08 Jul 2009
Posts: 17
Location: bangalore

PostPosted: Tue Jul 14, 2009 3:04 pm
Reply with quote

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
View user's profile Send private message
to_sreeni

New User


Joined: 08 Jul 2009
Posts: 17
Location: bangalore

PostPosted: Tue Jul 14, 2009 4:48 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 14, 2009 8:35 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 14, 2009 8:48 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top