MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Comparing two files with different layouts

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 705
Topics: 65
Location: MD, USA

PostPosted: Wed Sep 09, 2026 8:48 am    Post subject: Comparing two files with different layouts Reply with quote

Hi,

I have file-aid DB2 RDX extracts of two versions of a database in flat files. I have corresponding XREF and COBOL layout. Is there a way to compare the common fields in the two files. I am thinking of generating file-aid compare cards for these two layouts but checking if a simpler solution exists.


Diba.


Edit:

Comparison report should report all differences at field level with field names and old and new values, like -

Code:
FIELDA:     123456   | 234567
FIELDC:     DIBAKAR  | RAKABID
FIELDABC:   MVS      | ZOS

_________________
Regards,
Diba


Last edited by Dibakar on Thu Sep 10, 2026 2:34 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12406
Topics: 75
Location: San Jose

PostPosted: Thu Sep 10, 2026 7:56 am    Post subject: Reply with quote

Dibakar,

You can use DFSORT's JOINKEYS to compare the files with different layouts. You can check the smart-tricks

https://www.ibm.com/support/pages/smart-dfsort-tricks

    Join fields from two files on a key
    Join fields from two files record-by-record
    Cartesian join
    Create files with matching and non-matching records

Here is the documentation of JOINKEYS
https://www.ibm.com/docs/en/zos/3.2.0?topic=guide-using-joinkeys-application-joining-two-files
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 705
Topics: 65
Location: MD, USA

PostPosted: Thu Sep 10, 2026 2:38 pm    Post subject: Reply with quote

Thanks Kolusu. I need differences at field level with field names, edited my post with a sample report. I think it would be challenging to do that with DFSORT.
_________________
Regards,
Diba
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12406
Topics: 75
Location: San Jose

PostPosted: Thu Sep 10, 2026 8:39 pm    Post subject: Reply with quote

Dibakar wrote:
Thanks Kolusu. I need differences at field level with field names, edited my post with a sample report. I think it would be challenging to do that with DFSORT.


Dibakar,

Challenging but very much do-able. So please post a sample of BOTH input files along with desired output along with DCB properties of the input and output files and we will see if it can be done using DFSORT.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 705
Topics: 65
Location: MD, USA

PostPosted: Fri Sep 11, 2026 8:32 am    Post subject: Reply with quote

Kolusu,

For input there will be two sets (old and new) each of - File-Aid Xref, Cobol layout and data files. Automation will have to process all these to generate the compare code. It will take some time for me to create them that I can post here.
_________________
Regards,
Diba
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group