joining 2 file with "full record" result



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

joining 2 file with "full record" result

Postby lostcontinent » Mon Jan 10, 2011 2:08 pm

Hi to all,
I have 2 big files with variable record length (each about 300000 records).
I know that in both files are some identical records (about 100).
How can I retrieve those identical records?
I tried
//STEP3    EXEC PGM=SORT                       
//SORTJNF1 DD DISP=SHR,DSN=File1
//SORTJNF2 DD DISP=SHR,DSN=File2
//*ORTOUT  DD SYSOUT=*                             
//SORTOUT  DD DSN=File3,   
//            DISP=(NEW,CATLG,DELETE),             
//            LIKE=File1
//SYSOUT   DD SYSOUT=*                             
//SYSUDUMP DD DUMMY                                 
//SYSIN    DD *                                     
  JOINKEYS FILE=F1,FIELDS=(1,390,A)                 
  JOINKEYS FILE=F2,FIELDS=(1,390,A)                 
  REFORMAT FIELDS=?????
  SORT FIELDS=COPY       

But I don't know how to tell SORT with the REFORMAT statement that I want to have the complete record (anyway of from F1 or F2, because the records are the same)
Or is there another way to achieve this?
thanks a lot in advance,
frank
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: joining 2 file with "full record" result

Postby lostcontinent » Mon Jan 10, 2011 2:17 pm

Uups, I got it:
REFORMAT FIELDS=(F1:1,4,5)
thanks for looking ;-)
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: joining 2 file with "full record" result

Postby dick scherrer » Tue Jan 11, 2011 4:04 am

Good to hear it is working - thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post