Yes. Like I said, you have to detect when the program is done yourself (eof). At that point you can close the file and the other program will terminate.
i am not sur what you mean how can i see if the program is done ?? i mean finished it takes up a day somethimes ??? so .. ?? hmm well .. deppends realy on the amount of data it has to proces.