Threading: Help needed Want to suspend and resume the loop function in the thread for every 100 lines of read in csv file

Nov 21 2007 4:44 AM

Threading: Help needed Want to suspend and resume the loop function in the thread for every 100 lines of read in csv file

Hi friends, I need to create multiple threads (Max-200) to read the csv files from the various servers and load into mssql. The csv files are very large.We need to read the batch of lines from every server (csv file). For every 100 line of read the thread has to wait for all other threads to finish their 100 lines reading.

How to stop the loop of csv file reading for every 100 line and wait for the all other threads to be finished 100 lines of reading.

I mean how to suspend and resume the line reading loop for every 100 lines.

I will explain in detail now. It is telephone billing details. Already for accounting we are downloading the previous day billing details from all the 200 servers and doing to BCP to upload.
But routing department need to check the Quality of the call termination. They need the billing details written upto last hour.
We have a package writtent by mey ex colleague which use [net use] command in dos batch and open the file like this [\\10.37.2.53\d$\cdr\C0111102007.cdr-CSV format] and read 100 lines from the each file and upload to server in rotational basis. It reads the file for every second. But there is a sever delay in this program. By the time it finish the 200th server and come back to 1st server to read 100 line, there will be 1000s of lines written in the first server.

Unfortunately we lost the source code for the application and he left the company long time back.

I think this will explain my requirement clearly.

thanks in advance my friends.

Unfortunately We cannot install any application in the billing server because there is a critical application running in the server.