View previous topic :: View next topic |
Author |
Message |
ranjit2705 Beginner

Joined: 25 Mar 2003 Posts: 12 Topics: 8
|
Posted: Thu Nov 12, 2009 11:24 pm Post subject: Remove Duplicates in one file using another file |
|
|
HI
I want to remove the records from FILEA which are present in FileB. Can this be done through SORT? Please help
Example
FILEA
AAAAA
BBBBB
CCCCC
DDDDD
EEEEEE
FFFFFFF
FileB
AAAAA
BBBBB
I want to create File C having
CCCCC
DDDDD
EEEEEE
FFFFFFF _________________ Regards
Ranjit S Panda
Software Engineer |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Nov 13, 2009 11:09 am Post subject: |
|
|
ranjit2705,
Since you did not provide any more details like the LRECL, RECFM, Key Position and Format , I am assuming the following
Both Files are FB recfm and 80 byte lrecl and the key position is first 10 bytes and you don't have any duplicates within each file on the key
Concatenate both files together and use the following DFSORT ICETOOL JCL
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
AAAAA
BBBBB
CCCCC
DDDDD
EEEEEE
FFFFFFF
// DD *
AAAAA
BBBBB
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,10,CH) NODUPS
/* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Sat Nov 14, 2009 5:47 am Post subject: |
|
|
And nor do you specify which sort product that you are using. Also it is important to show which level of the product is installed as this may also affect the solution.
Please be aware that the solution may vary depending on which sort product that you are using, so you may have another forum member spending time on a solution which will not work because it is either the wrong product or the wrong release level. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
|
|