>>program is running fine from the tc
I guess that means Turbo C compiler ?
Sounds like the csv file is not where you think it is. Check to see that it is located in the same directory as the *.exe file. If not, then did your program specify the full path to the file in the open statement ? [edit]see line 535 of the code you posted[/edit]