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

MATCH records in 2 files


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

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Tue Oct 13, 2015 1:40 pm
Reply with quote

I have 2 files with below info

File1
111aaa
111bbb
111ccc
222ddd
333eee
444fff
444ggg
444hhh

File2
111
333

File 2 contain some records with key equal part of File1.

we want to have below output:
Output Fil1 - contain those records with key in File2;
111aaa
111bbb
111ccc
333eee

Output File 2 - contain those records with key not in in File2;
222ddd
444fff
444ggg
444hhh

Can we use SORT/ICETOOL complete above logic? Thanks.
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: Tue Oct 13, 2015 2:13 pm
Reply with quote

Yes, of course. It is a simple JOINKEYS with JOIN UNMATCHED,F1, a REFORMAT statement for the entire F1 and the match-marker, ?, and two OUTFILs which select on the match-marker and BUILD to get only the original data.

Lots of examples here.
Back to top
View user's profile Send private message
rally

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Tue Oct 13, 2015 3:07 pm
Reply with quote

Woodger,

Can you give me sample for this or some other OLD sample post/URL? Thanks
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: Tue Oct 13, 2015 3:16 pm
Reply with quote

You joined 10 years ago. Click on the forum name, put JOINKEYS in the search-box and you should see over 400 examples.
Back to top
View user's profile Send private message
rally

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Tue Oct 13, 2015 3:49 pm
Reply with quote

@Woodger, I have solved issue now. Thanks. icon_biggrin.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Tue Oct 13, 2015 5:04 pm
Reply with quote

Quote:
You joined 10 years ago
so you should also know how to use the code tags.
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 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 Pulling a fixed number of records fro... DB2 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top