Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 7312

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

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: 2247
Location: Hampshire, 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 adrdssu tool to dump a files from a PDS Kannan Ramalingam JCL & VSAM 5 Fri Nov 01, 2019 6:25 pm
No new posts DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 2 Sat Oct 05, 2019 10:01 pm
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am

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