Merge and eliminate duplicates using SORT



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

Merge and eliminate duplicates using SORT

Postby gauravuppal11 » Thu Mar 14, 2013 11:28 pm

I have two variable record size files FILEA and FILEB with key from position 15 to position 113.
Both the files can contain duplicates on the key.

I want to merge these two files ( write all records of both file) into one file but if there are duplicates present on the key, i want to write the records ONLY from filea.

How can i do this using sort / icetool.
gauravuppal11
 
Posts: 18
Joined: Thu Mar 14, 2013 11:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Merge and eliminate duplicates using SORT

 

Re: merge and eliminate duplicates

Postby skolusu » Fri Mar 15, 2013 3:20 am

1. What is the LRECL and RECFM of the input file1?
2.What is the LRECL and RECFM of the input file2?
3. Please run the following job and show us the complete sysout which helps us determine the level of DFSORT you have.
//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *             
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *             
  OPTION COPY               
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: merge and eliminate duplicates

Postby gauravuppal11 » Fri Mar 15, 2013 8:25 am

LRECL = 728 RECFM = VB for both the files
Here is the sysout you have requested for -
********************************* TOP OF DATA *************************************************************************************
SYNCSORT FOR Z/OS 1.3.2.2N U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSORT INC. DATE=2013/073 TIME=21.54.00
z/OS 1.13.0
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1BDBD, MODEL 2097 408 LICENSE/PRODUCT EXPIRATION DATE: 02 MAY 2014
SYSIN :
OPTION COPY
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER054I RCD IN 0, OUT 0
WER169I RELEASE 1.3 BATCH 0513 TPF LEVEL 2.2
WER052I END SYNCSORT - ,SORT,,DIAG=8600,4044,AA8A,00E6,CE66,68EB,AE88,A666
******************************** BOTTOM OF DATA ***********************************************************************************
gauravuppal11
 
Posts: 18
Joined: Thu Mar 14, 2013 11:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: merge and eliminate duplicates

Postby NicC » Fri Mar 15, 2013 1:09 pm

I suggest you actually read your sysout especially line 1 and then you will know why the topic has been moved.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: merge and eliminate duplicates

Postby gauravuppal11 » Fri Mar 15, 2013 9:44 pm

Ok i am sorry if i posted in the wrong heading. I will wait for someone to reply then.
gauravuppal11
 
Posts: 18
Joined: Thu Mar 14, 2013 11:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: merge and eliminate duplicates

Postby BillyBoyo » Sat Mar 16, 2013 5:20 pm

Simplest would be to "de-duplicate" your file 2 in a separate step (as, with SyncSort 1.3.2 I don't think you can use the JNFnCNTL files for JOINKEYS) and then it is a simple JOINKEYS operation.

If your file 2 is enormous, let us know and there might be something using fewer resources, but with more code.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: merge and eliminate duplicates

Postby gauravuppal11 » Mon Mar 18, 2013 9:44 pm

Thanks for the reply, yes my File 2 is humongous.
gauravuppal11
 
Posts: 18
Joined: Thu Mar 14, 2013 11:18 pm
Has thanked: 2 times
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post