Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to get values which are diff b/w 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ganesh_al

New User


Joined: 06 Sep 2006
Posts: 1
Location: USA

PostPosted: Thu Sep 22, 2011 1:56 am    Post subject: Need to get values which are diff b/w 2 files
Reply with quote

Hi

here is my requirement..! I have two files in hand.. I want to compare these two files and get a report as output which should show the key - followed by value which is different in file1 and value in file2.

Here is the example:
File 1 data
123ABC 123456
123DEF 123789

File 2 Data
123ABC 123456
123DEF 123456

Here first 6 characters are key. Followed by that I have data..
Now I wish to have my output as - Key - followed by first file's data which was different and then second file data's which was different..
123DEF 789 456
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu Sep 22, 2011 4:05 am    Post subject:
Reply with quote

You show only one example with different data. I can think of many different variations but you haven't given clear rules for all of those variations. It also isn't clear if you're comparing the two files key by key or record by record, or whether you have duplicate records within a file?

Here are some other possible input examples that you haven't covered - there are many more.

Code:

file1
123ABC 123456
123DEF XY345Z
123XYZ 123456
123XYZ 567890
123ZZZ 123456

file2
123ABC 153537
123DEF QR345S
123XYZ 123456
123XYZ ABCDEF
123YYY 123456


You would need to a much better job of explaining the rules for getting from input to output for all variations before anyone can help you. But I suspect you won't be able to do what you want with DFSORT since it can't show the difference in records at specific positions.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Sep 22, 2011 4:13 am    Post subject: Reply to: Need to get values which are diff b/w 2 files
Reply with quote

ganesh_al,

It looks more like what you want is a file-comparison utility. Find out what you have available, look at the manuals, try it out.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 22, 2011 3:30 pm    Post subject:
Reply with quote

Hi, Welcome...

With examples you have shown, one might think you are matching chunks of 3 characters at a time like 123 with 123, 789 with 456...

Show the expected output for example shown by Frank.

What is LRECL\RECFM of input files

What is sort product installed at your shop?
(If you are not aware how to find .. Follow link http://ibmmainframes.com/viewtopic.php?t=33389 )
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 1 Tue Jul 25, 2017 12:12 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us