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 to get new and changed records only

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

New User


Joined: 08 Oct 2013
Posts: 6
Location: Canada

PostPosted: Wed Mar 12, 2014 9:05 pm    Post subject: Compare 2 files to get new and changed records only
Reply with quote

Hi,
I have 2 files with the same layout (1212 bytes), the files are sorted and duplicates removed, how can I compare these files to include records from the second file if it is a new record or a changed record. The key are in positions 1(10 bytes), 663(6 bytes) and 992 (10 bytes). A new record is when a record exists in file2 but not in file1. A changed record is when the key fields for a record in file 2 matches the key fields of record in file1 but any of the non key fields are different.
Can this be done using the icetool or DFSORT?

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

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Thu Mar 13, 2014 4:16 am    Post subject: Reply to: Compare 2 files to get new and changed records onl
Reply with quote

If you are wanting a DFSort/Icetool solution why post in the JCL section of the forum instead of the DFSort/Icetool section?
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Mar 13, 2014 9:55 am    Post subject: Re: Compare 2 files to get new and changed records only
Reply with quote

Dharmesh Amal wrote:

the files are sorted and duplicates removed
The key are in positions 1(10 bytes), 663(6 bytes) and 992 (10 bytes).


Are they PS/Sequential files or VSAM(KSDS) files?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Thu Mar 13, 2014 11:27 am    Post subject:
Reply with quote

you may wants to explore more on JOINKEYS at,

http://www-01.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Mar 13, 2014 10:14 pm    Post subject:
Reply with quote

For examples of using JOINKEYS for various matching applications, see the "Create files with matching and non-matching records" Smart DFSORT Trick at:

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