Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us