IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compare 2 files to get new and changed records only


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 2454
Location: Hampshire, UK

PostPosted: Thu Mar 13, 2014 4:16 am
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
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3112
Location: NYC,USA

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

you may wants to explore more on JOINKEYS at,

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

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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Joining files with intermittent heade... SYNCSORT 1
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts INPFIL FILES, FNAMES examples SYNCSORT 7
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sort SMF records? SYNCSORT 6
Search our Forums:


Back to Top