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
 

 

Compare 2 files and write matching and unmatching record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Ankurjain299

New User


Joined: 03 Feb 2007
Posts: 2
Location: india

PostPosted: Mon May 24, 2010 5:58 pm    Post subject: Compare 2 files and write matching and unmatching record
Reply with quote

Hi,
Could any one please help in below requirement using DFSORT

I have two input file (lets say file A and file B) both of same record length of 120
Format of both the files is like this:

PLAN BRANCH GROUP ASSOC BRKIND SN SUBNAME

999 00 099930 001 783784 NICHOLAS
911 00 099180 001 134545 SABINE TH
911 00 099180 001 134545 SABINE TH
999 00 099280 001 134325 DONALD W.
935 00 099580 001 266555 NYSSA H.
900 00 099540 001 X 356565 AIMEE N.
900 00 099480 001 X 356546 DIANE L.
935 00 099950 001 3456234 DANA M. H
900 00 099940 001 4245455 JONNA R.
900 00 099940 001 4657777 CARLY M.
900 00 099480 001 4634664 DAVID T.

File A contains duplicate records

What i want is
1) Remove all the records in file A with GROUP 099940
2) Sort file A with respect to PLAN and GROUP
3) After that remove All the duplicates from file A
4) Sort File B with respect to PLAN and GROUP
5) Now compare file A and File B and all the matching record has to be written in File C of same format and all the unmatched records from both the file, in a different file


Thanks in advance
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon May 24, 2010 9:23 pm    Post subject:
Reply with quote

ankurjain299,

Please see the Smart DFSORT trick "Create files with matching and non-matching records" here

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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