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: 1848
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: 1742
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


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