Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 2237
Location: Hampshire, 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: 2271
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 DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 0 Sat Oct 05, 2019 10:01 pm
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am
No new posts Concatenate two files of variable rec... Thiru S DFSORT/ICETOOL 3 Wed Aug 21, 2019 11:53 pm

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