Author: Robert Sample
Posted: Wed Jun 14, 2017 3:13 am (GMT 5.5)
ram_vizag, after almost 9 years here you should know that this is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. If you ask for code, be prepared to pay the going rate for it. Furthermore, you did not specify the record length of the file, nor whether you are calling duplicates a complete duplicate or just a duplicate key (and if so, how long the key is and where it starts), so nobody could help you even if they wanted to give you the code.
Google is your friend. Googling joinkeys returned about 40,900 hits and one of the first was https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/ice2ca_Example_1_-_Paired_F1_F2_records_without_duplicates.htm which has an example of precisely what you want, using 2 files instead of 1.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
Posted: Wed Jun 14, 2017 3:13 am (GMT 5.5)
ram_vizag, after almost 9 years here you should know that this is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. If you ask for code, be prepared to pay the going rate for it. Furthermore, you did not specify the record length of the file, nor whether you are calling duplicates a complete duplicate or just a duplicate key (and if so, how long the key is and where it starts), so nobody could help you even if they wanted to give you the code.
Google is your friend. Googling joinkeys returned about 40,900 hits and one of the first was https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/ice2ca_Example_1_-_Paired_F1_F2_records_without_duplicates.htm which has an example of precisely what you want, using 2 files instead of 1.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth