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
 
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: 2012
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: 1896
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am

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