1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Compare two text files

Discussion in 'C' started by imported_krish, Apr 7, 2011.

  1. imported_krish

    imported_krish New Member

    Joined:
    Apr 6, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I have two text files, master and daily.
    the files have 3 columns, data1, data2, data3.
    I need to compare the records in daily file with the master and report whereever the records are not matching.
    all the mismatch records are to be written in a seperate file. I tried using filecomp (fc) of dos and it did not work. I tried using other tools and the time consumed was very high.
    just to give an idea on the size of the file, master file contains 200,000 records and the daily file contains 90,000. the possibility of mismatch is only 7-8% of the daily file.

    I am yet to try using arrays..

    Pls help in solutioning this. Thanks

    Regards
    krishna
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    1
    Trophy Points:
    0
    Arrays will crash your system and so instead of doing this try to get the data inserted into database and then use queries to get the desired output.
     

Share This Page