Syncsort to compare two files



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Syncsort to compare two files

Postby Shambu » Tue May 12, 2020 12:32 pm

Hi,

I have two vsam files with an unique key at positions 1 to 10 at both the files.
I want to sort out all the records in file 2 which is matching with key value field in file 1.
FILE 1
XXXXXXXXXX A B C D
AAAAAAAAA P Q R S
YYYYYYYYYY D E F G
ZZZZZZZZZZ L M N O

FILE 2
XXXXXXXXX ABC DEF KLM
XXXXXXXXX GHO MNO QRS
XXXXXXXXX UVW XYZ ABC
YYYYYYYYY ABC MNO QRS
ZZZZZZZZZ PQR TUV LMN
ZZZZZZZZZ XYZ ABC TUV

Desired output

XXXXXXXXX ABC DEF KLM
XXXXXXXXX GHO MNO QRS
XXXXXXXXX UVW XYZ ABC
YYYYYYYYY ABC MNO QRS
ZZZZZZZZZ PQR TUV LMN
ZZZZZZZZZ XYZ ABC TUV

Could someone please help me to write a sort card for this.


coded for You so that You can see how it easier to understand the data



FILE 1
XXXXXXXXXX  A  B  C   D
AAAAAAAAA   P  Q  R  S
YYYYYYYYYY  D  E  F  G
ZZZZZZZZZZ  L  M  N  O

FILE 2
XXXXXXXXX  ABC DEF KLM
XXXXXXXXX  GHO MNO QRS
XXXXXXXXX  UVW XYZ ABC
YYYYYYYYY  ABC MNO QRS
ZZZZZZZZZ  PQR TUV LMN
ZZZZZZZZZ  XYZ ABC TUV

Desired output

XXXXXXXXX  ABC DEF KLM
XXXXXXXXX  GHO MNO QRS
XXXXXXXXX  UVW XYZ ABC
YYYYYYYYY  ABC MNO QRS
ZZZZZZZZZ  PQR TUV LMN
ZZZZZZZZZ  XYZ ABC TUV
Shambu
 
Posts: 5
Joined: Tue May 12, 2020 11:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort to compare two files

Postby enrico-sorichetti » Tue May 12, 2020 1:03 pm

asked and replied gazillions of times , search the forum or look at

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

even if the paper was written for IBM DFSORT , most of the suggestions are valid also for SYNCSORT

when You post data use the code tags, it makes thing easier for people who spend their time helping
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2979
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 160 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post