in reply to Re: Reg: Performance
in thread Reg: Performance

Dear Friend, I am little bit of confused here. In DUMP_A i have unique id and DUMP_B i have unique id along with ACCT #. Consider, this is my inputs.

DUMP_A: ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c20 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c20 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 ffe47aadf1add54e3a8e925b40530c29 DUMP_B: ffe47aadf1add54e3a8e925b40530c20|323568945210360 ffe47aadf1add54e3a8e925b40530c20|323568945210361 ffe47aadf1add54e3a8e925b40530c20|323568945210362 ffe47aadf1add54e3a8e925b40530c20|323568945210363 ffe47aadf1add54e3a8e925b40530c20|323568945210364
It should take unique id from DUMP_A and check with DUMP_B, if it matches then both the value has to be write into the new file. The output should be as the below for the above inputs:
ffe47aadf1add54e3a8e925b40530c20|323568945210360 ffe47aadf1add54e3a8e925b40530c20|323568945210361 ffe47aadf1add54e3a8e925b40530c20|323568945210362 ffe47aadf1add54e3a8e925b40530c20|323568945210363 ffe47aadf1add54e3a8e925b40530c20|323568945210364

- Thank you.

Replies are listed 'Best First'.
Re^3: Reg: Performance
by choroba (Cardinal) on Oct 29, 2010 at 07:45 UTC
    BTW, the id in DUMP_A is not unique.
    Nevertheless, you can still use the algorithm: Sort both input files. Take the first id from DUMP_A. Process DUMP_B while it contains the same id. Move to the next id in DUMP_A, repeat until the end of DUMP_A.