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
 

 

MATCH records in 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: MATCH records in 2 files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Oct 13, 2015 2:13 pm    Post subject: Reply to: MATCH records in 2 files
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Oct 13, 2015 3:16 pm    Post subject: Reply to: MATCH records in 2 files
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    Post subject:
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: 1713
Location: UK

PostPosted: Tue Oct 13, 2015 5:04 pm    Post subject:
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    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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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