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

How to compare three files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Oct 05, 2011 10:24 am
Reply with quote

Can i compare 3 files with this ? if yes, then how ? or any alternativfe way.. to do the task
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Oct 05, 2011 10:40 am
Reply with quote

Only a topic over 6 years old! Ever heard of starting a new topic and not tailgating an old one?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Oct 05, 2011 10:48 am
Reply with quote

If you can be much clearer about what it is that you want, you may get an answer.

A little bit of thought might suggest if not possible/copmplicated with three it would be possible with two.

Take two files and join them together, not excluding/splitting anything. Then take the new file and the third file and do what you actually want to do. So you probably have a "fall-back".

Now, the usual, details of inputputs/outputs. Samples of inputs/outputs. Results of what you have tried so far/don't understand. How it failed. Etc.
Back to top
View user's profile Send private message
elango_K

New User


Joined: 18 Aug 2011
Posts: 44
Location: India

PostPosted: Wed Oct 05, 2011 4:24 pm
Reply with quote

Give some more details about your requirement.

What are the details available in your files.
What do you want to compare?

Can I compare 3 files: Yes
How? : depends on your requirement.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 05, 2011 4:47 pm
Reply with quote

<dumb> business requirement as posed ...
the output is going to be pretty unmanageable
think about the number of outputs requrred

1 ) record in A not in B not in C
2 ) record in A not in B ... in C
3 ) record in A .. in B not in C

repeat for B and C and eliminate the duplicates
and meditate about the complexity and the futility of the issue

anyway unless I am blatantly wrong here are the otuputs needed

Code:
record ... in A ... in B ... in C
record ... in A ... in B not in C
record ... in A not in B ... in C
record ... in A not in B not in C
record not in A ... in B ... in C
record not in A ... in B not in C
record not in A not in B ... in C


the only case where a 3 diffs is needed is in a clumsy/dumb programming environments
where two independent program changes are to be merged to produce a congruent final program
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Wed Oct 05, 2011 4:48 pm
Reply with quote

i had 3 files, and having matching/mismatch account numbers.
So i used the ICETOOL SPLICE by matching first and second files in one step, and 2nd & 3rd file in other step, then i compared these two subsets with another splice to produce the common entries.
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: Wed Oct 05, 2011 7:39 pm
Reply with quote

Hello,

Good to hear it is working - thank you for letting us know icon_smile.gif

Your solution is a good way unless you want to design and implement a 3-file match merge. Not as simple as a 2-file match/merge, but has been done many tmes icon_wink.gif

Depending on the release level of the sort product, you might also look at JOINing the files rather than SPLICEing.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top