duplicate records from which file?



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

duplicate records from which file?

Postby ranga_subham » Fri Jul 30, 2010 11:45 pm

Hi,

I use below JCL to find unique and duplicate records.......

//SYSIN    DD  *       
 SORT FIELDS=(1,4,CH,A)
 SUM FIELDS=NONE,XSUM 
//SORTOUT  DD SYSOUT=*        <-- UNIQUE RECORDS
//SORTXSUM DD SYSOUT=*       <-- DUPLICATE RECORDS
//SYSOUT   DD SYSOUT=*


I request you to help me the SORT card using Joinkeys feature to achieve the same.

Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: duplicate records from which file?

Postby Alissa Margulies » Sat Jul 31, 2010 12:12 am

Your SUM statement does not identify solely the unique records and print them to SORTOUT. It prints the unique records AND the first of equally keyed records to SORTOUT. SORT with a SUM statement can be used with a single or multiple input data sets.

The JOIN feature is used to compare records from two input files, not within a single input file.

What exactly are you trying to do?
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: duplicate records from which file?

Postby arcvns » Mon Aug 02, 2010 1:08 pm

The application has to be designed based on the requirement. You seem to have decided to use JOINKEYS, whatsoever the requirement may be! :o
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: duplicate records from which file?

Postby ranga_subham » Mon Aug 02, 2010 8:29 pm

I used REFORMAT FIELDS with joinkeys statement to achieve same purpose..... :D

//SYSIN    DD *                   
  JOINKEYS FILE=F1,FIELDS=(1,4,A)
  JOINKEYS FILE=F2,FIELDS=(1,4,A)
  REFORMAT FIELDS=(F1:1,4)       
  SORT FIELDS=COPY               


Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: duplicate records from which file?

Postby arcvns » Tue Aug 03, 2010 12:22 pm

ranga_subham wrote:I used REFORMAT FIELDS with joinkeys statement to achieve same purpose..... :D

//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,4,A)
JOINKEYS FILE=F2,FIELDS=(1,4,A)
REFORMAT FIELDS=(F1:1,4)
SORT FIELDS=COPY


Thanks.
The above job is nowhere related/equivalent to the one which you showed first. Which purpose you have achieved in common?!!!
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post