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
 
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: 7315

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: 7315

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: 1894
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
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

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