Join two sort step into one



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Join two sort step into one

Postby zhinghur » Thu Mar 21, 2013 7:33 pm

Hi All,

Can you please help me to join the two steps and make it one ?

I am getting error with Reformat parameter while trying to make it one.

//DIFF EXEC PGM=SORT
//SORTJNF1 DD DSN=File1,DISP=SHR
//SORTJNF2 DD DSN=File2,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SORTOUT DD DSN=file3,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,11,A)
JOINKEYS FILE=F2,FIELDS=(1,11,A)
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F1:1,80)
OPTION COPY
/*

//FORMAT EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=File3,DISP=SHR
//SORTOUT DD DSN=File4,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,11,C' YES ',80:X)
/*

Thanks,
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Join two sort step into one

 

Re: Join two sort step into one

Postby NicC » Fri Mar 22, 2013 12:57 am

Surely you know how to use the code tags by now to make your data more presentable?
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: Join two sort step into one

Postby skolusu » Fri Mar 22, 2013 2:32 am

zhinghur,

Are you getting the right results? You have JOIN UNPAIRED,ONLY without file name and it produces all unmatched records from both files. However your REFORMAT statement is only building the first 80 bytes from FIle1. Any unmatched record from File2 will have spaces. Is that what you really want?
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


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post